[R] Cutting vectors
Patrik Waldmann
Patrik.Waldmann at sysbot.lu.se
Fri Mar 31 15:20:09 CEST 2000
I have one factor with say five levels (fact) of different size and a corresponding variable (var). I randomly generate five new levels (nfact ex. 2,2,1,5,4). What I would like to do is to extract the corresponding variable values into a new variable (nvar). I did try the following, why doesn't it work? nvar<-var[fact==nfact[ ]]
Patrik Waldmann
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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