Re: [R] use zoo package with multiple column data sets

2010-01-30 Thread Gabor Grothendieck
Its a bug. Its now fixed it in the development source so try this: library(chron) library(zoo) source("http://r-forge.r-project.org/plugins/scmsvn/viewcvs.php/*checkout*/pkg/zoo/R/na.approx.R?rev=653&root=zoo";) source("http://r-forge.r-project.org/plugins/scmsvn/viewcvs.php/*checkout*/pkg/zoo/R

Re: [R] use zoo package with multiple column data sets

2010-01-30 Thread e-letter
> library(chron) > library(zoo) > z1<-read.zoo("~/path/to/test1.csv",header=TRUE,sep=",",FUN=times) > z2<-read.zoo("~/path/to/test2.csv",header=TRUE,sep=",",FUN=times) > z3<-(na.approx(merge(z1,z2),time(z1))) Error in approx(along[!na], y[!na], along[na], ...) : need at least two non-NA val

Re: [R] use zoo package with multiple column data sets

2010-01-29 Thread Gabor Grothendieck
Please provide a reproducible examples. You can use the following style: > Lines <- "01:01:0111 55 + 01:01:0422 66 + 01:01:0733 77 + 01:01:1044 88" > library(zoo) > library(chron) > z <- read.zoo(textConnection(Lines), FUN = times) > z

Re: [R] use zoo package with multiple column data sets

2010-01-29 Thread e-letter
Assuming my documentation is correct, my version shows faq 1 to refer to duplicate times but if file2 is: 01:01:0111 55 01:01:0422 66 01:01:0733 77 01:01:1044 88 I cannot see what is duplicate? If I create two new files: file3: 01:01:01

Re: [R] use zoo package with multiple column data sets

2010-01-29 Thread Gabor Grothendieck
See FAQ #1 of the zoo faq: vignette("zoo-faq") On Fri, Jan 29, 2010 at 7:12 AM, e-letter wrote: > Readers, > > I am trying to use the zoo package with an array of data: > > file1: > hh:mm:ss        1 > hh:mm:ss        2 > hh:mm:ss        3 > hh:mm:ss        4 > > file2: > hh:mm:ss        11    

[R] use zoo package with multiple column data sets

2010-01-29 Thread e-letter
Readers, I am trying to use the zoo package with an array of data: file1: hh:mm:ss1 hh:mm:ss2 hh:mm:ss3 hh:mm:ss4 file2: hh:mm:ss11 55 hh:mm:ss22 66 hh:mm:ss33 77 hh:mm:ss44 88 I wanted to merge these data set s