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 deal with some years ago. There were two output streams, one the time of each R wave and the other an asynchronous stimulus. In that case, I had to work out code to interdigitate the signals and do some processing of the resulting data. It sounds like you have two files, each recording times of input and output respectively one value to a line. If so, my first guess is:

x<-as.vector(read.table("input_times.dat"))
y<-as.vector(read.table("output_times.dat"))
xy<-list(x,y)
# to store this list in a file
# oops, bit too quick on the keyboard
dput(xy,file="xy_23_10_2009.R")

Jim

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to