[R] using subset

Antonio Olinto aolinto_r at bignet.com.br
Mon Dec 6 13:44:43 CET 2004


Hi,

I have doubts in using subset command. I have a list of, lets say, 15 species
and I want to make a subset with only 2 of them. IÂ’m the command
data2 <- subset(data1, species=="sp1"|species=="sp2")

Nevertheless, when I ask for the summary (summary(data2)) the others species
names still apearing. Also I tried
data2<-data1(data1$species %in% c("sp1","sp2")),]

But I got the same result. How can I get a "clean" subset?

Thanks for any help. Best regards.

Antonio Olinto



-------------------------------------------------
WebMail Bignet - O seu provedor do litoral
www.bignet.com.br




More information about the R-help mailing list