Sameer Mathur
# create a factor for Transmission Type
mtcars$am.f <- factor(mtcars$am,
levels=c(0,1),
labels=c("Automatic","Manual"))
# create a factor for number of cylinders
mtcars$cyl.f <- factor(mtcars$cyl,
levels=c(4,6,8),
labels=c("4-Cyl","6-Cyl","8-Cyl"))
library(gplots)
# Plot the mean of teeth length by dose groups
plotmeans(mtcars$mpg ~ mtcars$am.f, data = mtcars, frame = FALSE)
library(gplots)
# Plot the mean of teeth length by dose groups
plotmeans(mtcars$mpg ~ mtcars$cyl.f, data = mtcars, frame = FALSE)