Hi all:
I have an example that shows my problem:
> test <- data.frame(c("a", "b", "c"))
> colnames(test) <- "mm"
> sub <- subset(test, mm=="b")
> sub$mm
[1] b
Levels: a b c
> levels(sub$mm)
[1] "a" "b" "c"
How can I reduce the levels to exclusively those which are part of the
data frame? That is in the above named example exclusively "b".
Reason: I want to iterate exclusively through those levels that exist
within a subset, but leave away all others.
Thanks for any hint.
Claus
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html