[R] Cutting vectors

Patrik Waldmann Patrik.Waldmann at sysbot.lu.se
Mon Apr 3 10:40:50 CEST 2000


What I would like to do is as follows:
I have a factor ex. fact 1 1 1 1 1 2 2 2 3 3 3 3 4 4 4 4, Levels:  1 2 3 4
and a variable ex. var 11 12 13 14 15 21 22 23 31 32 33 34 41 42 43 44
I take a bootstrap sample from the levels ex. nlev 1 1 4 3
and would like to construct a new vector (variable) ex nvar that corresponds to the levels in nlev, nvar should then look like 11 12 13 14 15 11 12 13 14 15 41 42 43 44 31 32 33 34 
the next step would be to construct a new factor that corresponds to the size of the groups of nvar ex. nfact 1 1 1 1 1 2 2 2 2 2 3 3 3 3 4 4 4 4

Patrik

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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