[R] A rebel boxplot question

p.valdes at arsystel.com p.valdes at arsystel.com
Thu Oct 4 17:39:41 CEST 2007


Dear R list members
I am trying to improve a boxplot with 2 data sets. I run somethinkg like

boxplot(data1 ~ month, add=F, col = "red", ...)
boxplot(data2 ~ month, add=T, col = "blue", ...)

The problem is that the data from February are missing for data2, so R
think that must take little more space between the data classes in data 2
and then both data gropus are not aligned. In the R documentation I do not
find any posile solution for tell R that I want reserve a extra space for
this month, So the boxplot is erroneous and the x axis have a strange
numeration

1 2 3 4 54 65 76 ... etc

 I would be grateful if anyone could suggest how to tell R That the
boxplots must be fitted to the same x class in both data groups. To make
a false data group with a 0 valor for february is not aceptable in this
case

Sincerely
Pablo Valdes



More information about the R-help mailing list