[R] how to add row index based a categorical column

xin wei xinwei at stat.psu.edu
Tue May 31 18:36:09 CEST 2011


thank you everyone. how can I not be aware of the existence of ave()? I try
the following:
tapply(data$value, data$level, rank). However, I have a very difficult time
merging the resulting rank variable back to the original data frame. 

thanks a lot!


--
View this message in context: http://r.789695.n4.nabble.com/how-to-add-row-index-based-a-categorical-column-tp3556126p3563627.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list