Skip to content
Prev 451 / 7420 Next

Subset by family name?

This can still be a problem after subsetting with zombie factors hanging
around.  It's particularly annoying when your boxplotting from a subset,
as you'll have a bunch of empty entries in the plot.  I have a function I
call purgef that deals with eliminating levels of a factor that I have
subsetted out.

purgef<-function(x){
  x<-as.character(x)
  x<-as.factor(x)
  return(x)
}

Gets rid of those pesky zombie levels.

In your case

Yut_are$Mark<-purgef(Yut_are$Mark)