Skip to content
Prev 126119 / 398500 Next

A rebel boxplot question

On 5/10/2007, at 3:39 AM, <p.valdes at arsystel.com> wrote:

            
Your example is a bit confusing --- it must be ***month*** that  
February is missing from,
not data2!!! --- but basically if you make month into a ***factor***  
with levels equal to
the complete set of months, then boxplot() will leave a gap for any  
month that is missing.

E.g.

	clyde <- rnorm(100)
	melvin <- sample(letters[1:4],100,TRUE)
	melvin[melvin=="b"] <- "c"
	melvin <- factor(melvin,levels=letters[1:4])
	boxplot(clyde ~ melvin)

leaves a gap (an empty boxplot as it were) for b, and labels the x  
axis with "a", "b", "c", and "d".

BTW --- ``add'' and ``col'' do not seem to be arguments for boxplot().

			cheers,

				Rolf Turner


######################################################################
Attention:\ This e-mail message is privileged and confidenti...{{dropped}}