[R] applying cor.test in two different but matched dataframes

Gabriele Stocco stoccog at units.it
Fri Nov 17 20:21:00 CET 2006


Dear R help,
I have two dataframes with the same number of rows and columns. Each
column is for a patient, each row for a variable. The columns and rows
are matched in the two dataframes, so that each patient (column) and
each variable (row) has the same position in the two dataframes. The
values are different since each dataframe reports data from a
different way to measure the same variables in the sampe patients.

How can I make a cor.test, applying the function row by row in the two
different dataframes, possibly without merging them?

Thanks,

Gabriele Stocco
University of Trieste



More information about the R-help mailing list