[R] trying to produce an array of ranks
jc at or.psychology.dal.ca
Thu Aug 28 01:32:27 CEST 2003
OK, I am try to produce an array of ranks. I have a set of data (s)
that looks like this
Now I want to make a column that is an array of the ranks of rt by
subject. The closest of gotten is using the following.
r <- by (s, s$subj, function(d) rank(d))
This gets the data out with ranks but I cannot figure out how to easily
extract each of the lists and turn the whole thing into a nice straight
array (it is an array of lists when unclassed). I couldn't get
anything working with any of the apply's or ave. Any suggestions?
This seems like it should be a common task.
More information about the R-help