[R] subset syntax

Grum, Mikkel M.GRUM at CGIAR.ORG
Mon Aug 13 15:37:02 CEST 2001


Can anyone tell me what's wrong with this command??

xx<-subset(x,LOCAL.NAME==c("Chifumbata","Chikota"),select=c(13,16,19,23,26,2
9,30,33:48))

Warning message: 
longer object length
        is not a multiple of shorter object length in: LOCAL.NAME ==
c("Chifumbata", "Chikota")

both of the following commands work fine
xx<-subset(x,LOCAL.NAME==c("Chikota"),select=c(13,16,19,23,26,29,30,33:48))
xx<-subset(x,LOCAL.NAME==c("Chifumbata"),select=c(13,16,19,23,26,29,30,33:48
))

but I want a file with both the Chifumbatas and the Chikotas and several
others.

Cheers,
Mikkel



Mikkel Grum
Genetic Diversity Scientist
International Plant Genetic Resources Institute (IPGRI)
Sub-Saharan Africa Group
***
m.grum at cgiar.org
ipgri-kenya at cgiar.org
www.ipgri.cgiar.org

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list