[R] data file with columns of unequal length

2009-10-23 Thread William Simpson
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

Re: [R] data file with columns of unequal length

2009-10-23 Thread Jim Lemon
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

Re: [R] data file with columns of unequal length

2009-10-23 Thread Peter Dalgaard
Jim Lemon 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

Re: [R] data file with columns of unequal length

2009-10-23 Thread William Simpson
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 j...@bitwrit.com.au wrote: On 10/23/2009 07:58 PM,

Re: [R] data file with columns of unequal length

2009-10-23 Thread William Simpson
As I understand it, they don't come in pairs anyway. Correct. For the same reason a data frame is just the wrong kind of data structure. If you don't want separate data files, you can use one file with two columns where the second column is (say) 1 for the x and 2 for the y. Could you

Re: [R] data file with columns of unequal length

2009-10-23 Thread William Simpson
Thanks Jim. BTW the times in x and y are in ascending order (time of occurrence). If I do it this way, how do I actually read the data in and store in the file? Toy code, please. Bill Hi Bill, xy-list(x=1:10,y=1:100) Note that this cheerfully ignores how you are going to figure out which

Re: [R] data file with columns of unequal length

2009-10-23 Thread Peter Dalgaard
William Simpson wrote: As I understand it, they don't come in pairs anyway. Correct. For the same reason a data frame is just the wrong kind of data structure. If you don't want separate data files, you can use one file with two columns where the second column is (say) 1 for the x and 2

Re: [R] data file with columns of unequal length

2009-10-23 Thread William Simpson
OK thanks, I look at sleep and get it Bill On Fri, Oct 23, 2009 at 12:21 PM, Peter Dalgaard p.dalga...@biostat.ku.dk wrote: William Simpson wrote: As I understand it, they don't come in pairs anyway. Correct. For the same reason a data frame is just the wrong kind of data structure. If you

Re: [R] data file with columns of unequal length

2009-10-23 Thread Jim Lemon
On 10/23/2009 10:07 PM, William Simpson wrote: Thanks Jim. BTW the times in x and y are in ascending order (time of occurrence). If I do it this way, how do I actually read the data in and store in the file? Toy code, please. Hi Bill, This seems a bit like some heartbeat data that I had

Re: [R] data file with columns of unequal length

2009-10-23 Thread Jim Lemon
On 10/23/2009 10:07 PM, William Simpson wrote: Thanks Jim. BTW the times in x and y are in ascending order (time of occurrence). If I do it this way, how do I actually read the data in and store in the file? Toy code, please. Hi Bill, This seems a bit like some heartbeat data that I had to