Hello, I have two zoo objects, new and old, indexed by chron objects. Their structure is like this:
(05/25/06 00:00:00) NA NA NA (05/25/06 00:02:00) 948.20 24.198 0 (05/25/06 00:04:00) 948.26 20.640 0 (05/25/06 00:06:00) 948.37 19.653 0 (05/25/06 00:08:00) 948.48 19.135 0 (05/25/06 00:10:00) 948.54 22.510 0 (05/25/06 00:12:00) 948.55 27.175 0 (05/25/06 00:14:00) 948.46 30.075 0 (05/25/06 00:16:00) 948.59 28.815 0 (05/25/06 00:18:00) 948.96 27.938 0 old spans a larger range of dates than new. I would like to take all the values in new that are not NA and place them in old, matching the time indices. I have tried a number of variations on the themes of merge and replace, but can't get them to work, and the brute force for loop solution is unnacceptably slow. Could someone suggest a solution? Many thanks, Tim ______________________________________________ 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.