Ah, so, you have factors that are no longer present in the data. I use a quick
function I wrote called purgef to get rid of zombie factors.
purgef-function(x) lapply(x, function(x) x[drop = TRUE])
So, here, before your boxplot
dat$ageclass - purgef(dat$ageclass)
On Jan 6, 2011, at 9:09 AM,
On 11-01-06 12:16 PM, Jarrett Byrnes wrote:
Ah, so, you have factors that are no longer present in the data. I
use a quick function I wrote called purgef to get rid of zombie
factors.
purgef-function(x) lapply(x, function(x) x[drop = TRUE])
So, here, before your boxplot
dat$ageclass
Hi,
for one factor, it is enough to do
dat$ageclass - dat$ageclass[drop=TRUE]
the 'purgef' function applies the drop statement for each columns in
the data frame and eventually returns a list because that's how
'lapply' works. If you want a data frame in the end, you can either do
(as I recall