[R] row-wise dataframe calculation

kestickler@netscape.net kestickler at netscape.net
Thu Sep 13 23:51:18 CEST 2001


Hi,

i have a dataframe such as:

      Exp1 Exp2 Exp3
name1 12.6 78.0 45.6
name2 11.9 19.0 21.0
name3 10.0 14.0 17.0
...
...
...

Real datasets might be quite large - 20,000 rows by 100 columns

I want to calculate metrics such as the variation *row-wise*. So, var for name1, var for name 2, var for name3 etc.

Can someone kindly guide me on how best to code this?

Also, once such a metric has been calculated for each row, how best to store the results such that when (for instance) the results are sorted, i can access the row names along with the (ordered) variance value?

Thanks for any help.

ken




__________________________________________________________________




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