I need to use the drop.levels function in my box and whisker plot. The data I'm working with is Dance, the data frames are dance$new and dance$type, the variables I want included are Contra, Blues, and Swing. There are 3 other variables I do not want included; Lindy, Salsa, and Tango.
This is what I have:
box.labels<-c("Blues","Contra","Swing")
boxplot(dance$new~dance$type, ylab="Dance Count",
xlab="Type", name=box.labels, drop.levels(Lindy, Salsa, Tango),
main="Dancing for a Healthier You")
Am I incorporating drop.levels wrong?