> 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 values to interpolate > z3<-(na.approx(merge(z1,z2[,2]),time(z1))) Error in approx(along[!na], y[!na], along[na], ...) : need at least two non-NA values to interpolate > z3<-(na.approx(merge(z1,z2[,3]),time(z1))) Error in `[.zoo`(z2, , 3) : subscript out of bounds > z4<-read.zoo(textConnection(z2),FUN=times) Error in textConnection(z2) : invalid 'text' argument
______________________________________________ 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.