Can someone help with plotting in R using tidyverse? I got some errors.
These are the error messages:
Don't know how to automatically pick scale for object of type <tbl_df/tbl/data.frame>. Defaulting to continuous.
Error in geom_bar()
:
! Problem while computing aesthetics.
Error occurred in the 1st layer.
Caused by error in check_aesthetics()
:
! Aesthetics must be either length 1 or the same as the data (82964)
Fix the following mappings:
y
Run rlang::last_trace()
to see where the error occurred.
ggplot(data = df_clean)+
- geom_bar(mapping = aes(x = state, y = price))
Error in geom_bar()
:
! Problem while computing stat.
Error occurred in the 1st layer.
Caused by error in setup_params()
:
! stat_count()
must only have an x or y aesthetic.