[R] levels of factor

Luis Rideau Cruz Luisr at frs.fo
Tue Aug 17 16:30:12 CEST 2004


R-help,

I have a data frame wich I subset like :

a <- subset(df,df$"column2" %in% c("factor1","factor2")  & df$"column2"==1)

But when I type levels(a$"column2") I still get the same levels as in df (my original data frame)

Why is that?
Is it right?

Luis

Luis Ridao Cruz
Fiskirannsóknarstovan
Nóatún 1
P.O. Box 3051
FR-110 Tórshavn
Faroe Islands
Phone:             +298 353900
Phone(direct): +298 353912
Mobile:             +298 580800
Fax:                 +298 353901
E-mail:              luisr at frs.fo
Web:                www.frs.fo




More information about the R-help mailing list