Description Usage Arguments Value
This function aligns two or more time series to a common overlap point denoted time zero. Thus, multiple time series of unrelated dates can be compared by overlapping and normalizing
1 | xtsoverlay(data, timezero, offsets = c(-20, 100), norm = TRUE)
|
data |
The xts matrix data containing all time series to align. Each column corresponds to one time series that will be aligned based upon its associated time zero. Use function xtsbind to bind multiple xts matrices with different time indices. |
timezero |
A vector of dates denoting the time zero for each column in the data xts to align. Its length must equal the number of columns in the data xts. |
offsets |
A numeric vector of length 2 containing the negative and positive offsets with respect to timezero used to extract the data from the xts matrix. |
norm |
Logical. Specifies whether the curves are normalized at time zero. |
Returns a zoo matrix (Note: NOT xts) containing all the time series with numeric offsets instead of dates.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.