hello! still pretty new at R and i keep getting this error no matter what graph i try to do? just keeps reappearing alot this is the code where this shows up:Error in
f()
:
! stat_bin() can only have an x or y aesthetic.
ggplot(students , aes(x=Medu,y=G1)) + geom_line()+ geom_point() + labs(title="Relationship between Mothers Education and First Year Grades",x="Mother's Education", y="First Period Grade")+
theme_minimal() + scale_color_brewer(palette="Pastel1")
this is the sample data that i am trying to use for the code im getting an error in:
where for Medu it would be the mothers education where (numeric: 0 - none, 1 - primary education (4th grade), 2 – 5th to 9th grade, 3 – secondary education or 4 – higher education) and for G1 it would be first period grade (numeric: from 0 to 20)
V8 = c("Medu", "4","1","1","4","3","4","2"),
V32 = c("G1", "5","5","7","15","6","15", "12")
although when i do insert this code it still works? although for the colour change part it doesnt work....
ggplot (students , aes(x=famsize,y=G1)) + geom_jitter() + labs(title="Relationship between the Family Size and First Year Grades",x="Family Size", y="First Period Grade")+
theme_minimal() + scale_color_brewer(palette="Pastel1")
V7 = c("Pstatus", "A", "T", "T", "T", "T", "T", "T"),
V32 = c("G1", "5", "5", "7", "15", "6", "15", "12")
this is the sample data that i used where i didnt get an error in where famsize is family size (binary: 'LE3' - less or equal to 3 or 'GT3' - greater than 3).