Re: [R] Merge failure using zoo package

2010-04-07 Thread Gabor Grothendieck
On Wed, Apr 7, 2010 at 6:41 AM, e-letter wrote: > I tried your instructions, as shown. > >> library(chron) >> library(zoo) >> z1<-read.zoo("test1.csv",header=TRUE,sep=",",FUN=times) >> z2<-read.zoo("test2.csv",header=TRUE,sep=",",FUN=times) >> z12<-merge(z1,z2) >> z3<-na.approx(z12,xout=time(z1))

Re: [R] Merge failure using zoo package

2010-04-07 Thread e-letter
I tried your instructions, as shown. > library(chron) > library(zoo) > z1<-read.zoo("test1.csv",header=TRUE,sep=",",FUN=times) > z2<-read.zoo("test2.csv",header=TRUE,sep=",",FUN=times) > z12<-merge(z1,z2) > z3<-na.approx(z12,xout=time(z1)) Error in approx(along[!na], y[!na], along[na], ...) :

Re: [R] Merge failure using zoo package

2010-04-02 Thread Gabor Grothendieck
elp@r-project.org >> Subject: Re: [R] Merge failure using zoo package >> >> On 02/04/2010, Gabor Grothendieck wrote: >> > The code does not run with the files.  I need the requested >> > information, namely a single file containing code and data >> and t

Re: [R] Merge failure using zoo package

2010-04-02 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of e-letter > Sent: Friday, April 02, 2010 9:20 AM > To: Gabor Grothendieck > Cc: r-help@r-project.org > Subject: Re: [R] Merge failure using zoo package >

Re: [R] Merge failure using zoo package

2010-04-02 Thread Gabor Grothendieck
Below is the format that was requested. This has the data followed by the corrected code at the end. There are several things that were wrong: 1. z1[,2] is wrong since z1 is a vector, not a 2d matrix. Ditto for z2. Ideally zoo would have given an error message but in any case its wrong. It sh

Re: [R] Merge failure using zoo package

2010-04-02 Thread e-letter
On 02/04/2010, Gabor Grothendieck wrote: > The code does not run with the files. I need the requested > information, namely a single file containing code and data and that I > can just copy into a session without editing and see the result you > see. I don't understand how I can combine the four

Re: [R] Merge failure using zoo package

2010-04-02 Thread Gabor Grothendieck
The code does not run with the files. I need the requested information, namely a single file containing code and data and that I can just copy into a session without editing and see the result you see. On Fri, Apr 2, 2010 at 11:27 AM, e-letter wrote: > On 02/04/2010, Gabor Grothendieck wrote: >

Re: [R] Merge failure using zoo package

2010-04-02 Thread e-letter
On 02/04/2010, Gabor Grothendieck wrote: > The files only have one data column. What is the meaning of x[,2], > etc. ? What is z1? > I only want to merge one column from one file with one column from another file. With [x,2], I am trying to select the column of data. > Please provide reproduci

Re: [R] Merge failure using zoo package

2010-04-02 Thread Gabor Grothendieck
The files only have one data column. What is the meaning of x[,2], etc. ? What is z1? Please provide reproducible code and data all in a single file using this style so its clear what is what. Also please cut down the size of your data to the smallest size that will still illustrate the problem

Re: [R] Merge failure using zoo package

2010-04-02 Thread e-letter
Data files test1, ...2, ...3, ...4 respectively. time1,dataset1 01:01:00,0.73512097 01:01:30,0.34860813 01:02:00,0.61306418 01:02:30,0.01495898 01:03:00,0.27035612 01:03:30,0.69513898 01:04:00,0.46451758 01:04:30,0.61672569 01:05:00,0.82496122 01:05:30,0.34766154 01:06:00,0.69618714 01:06:30,0.390

[R] Merge failure using zoo package

2010-04-02 Thread e-letter
Readers, Please refer to attached example data files. It seems that the merge function fails for the latter section of the data set. Command terminal output: > library(chron) > library(zoo) > x<-read.zoo("test1.csv",header=TRUE,sep=",",FUN=times) > y<-read.zoo("test2.csv",header=TRUE,sep=",",FUN=