[R] Returning data in matrix form
Laura Quinn
laura at env.leeds.ac.uk
Mon Jan 19 20:27:35 CET 2004
I am trying to perform the following calculation for a very
large time series data set:
x<-unit(length*data.frame.a*data.frame.b,"cm")
data.frame.a and data.frame.b are of the same dimension, and I wish to
perform the calculation in one step so that "x" is returned as a
matrix/data.frame of equal dimension.
I have tried a couple of methods for this, (subsetting data.frame.a and
data.frame.b and performing the calculation on a column by column basis
for instance, and trying to loop a function over column data), but each
time I am returned with a list for x rather than a data frame.
Sorry if this is a stupid question, I have looked through some R
literature but don't seem able to find the answer.
Thank you for any help.
Laura
More information about the R-help
mailing list