[R] data file with columns of unequal length

William Simpson william.a.simpson at gmail.com
Fri Oct 23 12:56:53 CEST 2009


The way you do it is to compute the cross-intensity function (you can
google this; a key name is David Brillinger). The general problem is
that of system identification for point processes.

Bill

On Fri, Oct 23, 2009 at 10:31 AM, Jim Lemon <jim at bitwrit.com.au> wrote:
> On 10/23/2009 07:58 PM, William Simpson wrote:
>>
>> 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?
>>
>>
>
> Hi Bill,
>
> xy<-list(x=1:10,y=1:100)
>
> Note that this cheerfully ignores how you are going to figure out which x
> goes with which y(s).
>
> Jim
>
>




More information about the R-help mailing list