bind {timeSeries} | R Documentation |
Binds two 'timeSeries' objects either by column or by row.
returns a S4 object of class timeDate
.
## Load Microsoft Data Set -
x <- MSFT[1:12, ]
x
## Bind Columnwise -
X <- cbind(x[, "Open"], returns(x[, "Open"]))
colnames(X) <- c("Open", "Return")
X
## Bind Rowwise -
Y <- rbind(x[1:3, "Open"], x[10:12, "Open"])
Y