Message-ID: <298a6f61001290534l9ef3ba0tf79854c218c47a84@mail.gmail.com>
Date: 2010-01-29T13:34:55Z
From: e-letter
Subject: use zoo package with multiple column data sets
In-Reply-To: <971536df1001290433p1408acd5v1259aa57dedef8ac@mail.gmail.com>
Assuming my documentation is correct, my version shows faq 1 to refer
to duplicate times but if file2 is:
01:01:01 11 55
01:01:04 22 66
01:01:07 33 77
01:01:10 44 88
I cannot see what is duplicate? If I create two new files:
file3:
01:01:01 11
01:01:04 22
01:01:07 33
01:01:10 44
file4:
01:01:01 55
01:01:04 66
01:01:07 77
01:01:10 88
The previous commands work:
z1<-read.zoo("path/to/file1.csv",header=TRUE,sep=",",FUN=times)
z2<-read.zoo("path/to/file3.csv",header=TRUE,sep=",",FUN=times)
z3<-(na.approx(merge(z1,z2),time(z1)))
plot(z3$z1,z3$z2)
and:
z1<-read.zoo("path/to/file1.csv",header=TRUE,sep=",",FUN=times)
z2<-read.zoo("path/to/file4.csv",header=TRUE,sep=",",FUN=times)
z3<-(na.approx(merge(z1,z2),time(z1)))
plot(z3$z1,z3$z2)
Shouldn't I be able to have one file containing all the columns I want
to make graphs, instead of having to create numerous files of only two
columns of data?