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))
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], ...) :
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
> -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
>
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
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
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:
>
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
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
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
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=
11 matches
Mail list logo