[R] taking rows from a data frame

Jim Lemon bitwrit at ozemail.com.au
Thu Nov 21 03:39:30 CET 2002

Lei Jiang wrote:
> ...Here is my problem. I have a data frame by read.table(). I want to 
> take every row from this data frame and compute the correlation between
> the current row and a fixed vector. finally I want to append the
> correlation computed as a column to the data frame.

This might do what you want.


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