[R] Re: coding factor replicates

Brad Buchsbaum brad at aris.ss.uci.edu
Wed Jan 23 22:52:07 CET 2002


Hi All,

If I have a factor f:

A B C B C A C B A A B ....

and I would like to generate a factor to indicate the trial number
as a function of condition: e.g.

1 1 1 2 2 2 3 3 3 4 4 ...

how might I attack this in R?

thanks,

Brad Buchsbaum

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