[R] data file with columns of unequal length
William Simpson
william.a.simpson at gmail.com
Fri Oct 23 10:58:28 CEST 2009
I am running an expt that presents a point process input x and
measures a point process output y. The times of each event are
recorded. The lengths of the data records of x and y are necessarily
different, and can be different by a factor of 10. I would like to
save these data after each experiment as a file with two columns, one
for x and one for y.
However, R dataframes require columns of equal length. One solution is
to fill the "empty" places in y with NAs so it has the same length as
x. I view that as unsatisfactory (there are in reality no missing
values). Another possibility is to store x and y in separate files. I
also view that as unsatisfactory (it is too easy to lose track of the
y file corresponding to a given x file).
Can anyone suggest a way to deal with this situation?
Thanks very much for any help.
Bill
More information about the R-help
mailing list