I am trying to draw boxplots with the following code. When I run it, I get 2 empty boxes, with no plot. It must be something minor, but I can't seem to fix it. Can someone please help.
Sorry, just added the library as 1st line of code.
Here's my code:
library(HSAUR3)
data(schizophrenia2)
layout(matrix(1:2, nrow =1))
ylim <- range(schizophrenia2$month)
Less <- subset(schizophrenia2, onset == "< 20 Years")
More <- subset(schizophrenia2, onset == "> 20 Years")
boxplot(month ~ disorder, data = Less, ylab = "Month",
xlab = "Disorder", ylim = ylim, main = "Less than 20")
boxplot(month ~ disorder, data = More, ylab = "Month",
xlab = "Disorder", ylim = ylim, main = "More than 20")