I want to create an histogram by group.
I have tried the code but getting the error message "unexpected system in"
ggplot(df, aes(x="maize_acres", fill="group ", color="group"))+
geom_histogram,(position="identity")
I want to create an histogram by group.
I have tried the code but getting the error message "unexpected system in"
ggplot(df, aes(x="maize_acres", fill="group ", color="group"))+
geom_histogram,(position="identity")
Screenshots are not easy for people to use to help you. Please try to share your data in one of these methods listed in here: FAQ: How to do a minimal reproducible example ( reprex ) for beginners For example, you could do something like this dput(head(df, 50))
to show the first 50 rows and share that with us.
In the mean time, it's good to know two things that might help your code.
ggplot(df, aes(x=maize_acres, fill=Group, color=Group))+
geom_histogram,(position="identity")
ggplot(df, aes(x=`Maize acres`, fill=Group, color=Group))+
geom_histogram,(position="identity")
Also, there is a comma that shouldn't be there, between "geom_histogram" and the opening parentheses.
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.