Merge Two or More zoo Objects
Merge two zoo objects by common indexes (times), or do other versions of database "join" operations.
## S3 method for class 'zoo': merge(x, y, \dots, all = TRUE)
- x, y, ...
- two or more objects of class
- logical vector of the same length as the number of
"zoo"objects which should be merged (otherwise expanded). All indexes (times) of the objects corresponding to TRUE are included, for those corresponding to FALSE only the indexes
The indexes of different
"zoo" objects can be of different classes and are coerced to
one class in the resulting object (with a warning).
- An object of class
x.date <- as.POSIXct(paste("2003-02-", c(1, 3, 7, 9, 14), sep = "")) x <- zoo(rnorm(5), x.date) y1 <- zoo(matrix(1:10, ncol = 2), 1:5) y2 <- zoo(matrix(rnorm(10), ncol = 2), 3:7) merge(y1, y2, all = FALSE) merge(x, y1, y2, all = TRUE)
Looks like there are no examples yet.