Skip to content
Prev 12561 / 63461 Next

boxplot.formula with missing values (PR#6846)

I think this *is* the correct behaviour for a formula method. The problem
I see is that boxplot.formula does not have an na.action argument and so
you may not have realised that na.action=na.omit is the default.

Note that subset= will `remove the same rows from all columns', too.

It really is not the intention that the formula interface is used with 
matrices, and as.vector will do what I think you intended:

	boxplot(as.vector(fake.data) ~ as.vector(col(fake.data)))

Also, setting options(na.action=na.pass) will work as you expected.

I've added an na.action argument for R-devel.
On Mon, 3 May 2004 rdiaz@cnio.es wrote:

            
Well, not do what you expected, but the error appears to be in your 
expectations.