On Thu, 12 Apr 2007 [EMAIL PROTECTED] wrote: > attempted to get at this by merging the two time series (by union), > interpolating the NAs, and finally, subtracting one vector from the > other. The problem is that I can not combine the two zoo time series > objects using the merge() or cbind() functions. I get the following > error: > > Error in z[match0(index(a), indexes), ] <- a[match0(indexes, index(a))] > : > number of items to replace is not a multiple of replacement > length
Usually, problems like this occur when the time stamps in one of your time series are not unique. Maybe we should improve the error message by explicitely trying to catch this error. You can easily check this, e.g., via any(table(time(zoo_object)) > 1) > The input/output from a recent R Console session might help, Not really, the data itself would have been much more helpful...and even better some simplified artificial data set. hth, Z ______________________________________________ [EMAIL PROTECTED] 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.