Skip to content
Prev 132082 / 398506 Next

Plot question

On Fri, 2007-12-14 at 08:16 -0500, Alan Barnett wrote:
If you want boxplots, you could do something like this:

CV <- rnorm(100)
FV <- sample(c(1, 3, 6), 100, replace = TRUE)

boxplot(CV ~ factor(FV, levels = seq(max(FV))))


This essentially 'fills in' the missing values (levels) of the factor
variable so that they are included in the plot.

HTH,

Marc Schwartz