Saturday, January 21, 2017

r - Boxplot for each individual level in two factor columns?

This is my code. I have two factor variables (cyl and am)that I want to plot in my box plot.




boxplot(mpg~cyl+am,data=mtcars)





enter image description here



I want to make a boxplot for each individual factor levels - 4,6,8,0,1 but not the interaction of them (e.g. 4.0).



My box plot should only have (4,6,8,0,1) on the axis. How do I do that?

No comments:

Post a Comment