View source: R/merge.piar_index.R
merge.piar_index | R Documentation |
Combine two price indexes with common time periods, merging together the index values and percent-change contributions for each time period.
This is useful for building up an index when different elemental aggregates come from different sources of data, or use different index-number formulas.
## S3 method for class 'chainable_piar_index'
merge(x, y, ...)
## S3 method for class 'direct_piar_index'
merge(x, y, ...)
x |
A price index, as made by, e.g., |
y |
A price index, or something that can coerced into one. If |
... |
Not currently used. |
A combined price index that inherits from the same class as x
.
Other index methods:
[.piar_index()
,
aggregate.piar_index
,
as.data.frame.piar_index()
,
as.ts.piar_index()
,
chain()
,
contrib()
,
head.piar_index()
,
is.na.piar_index()
,
levels.piar_index()
,
mean.piar_index
,
split.piar_index()
,
stack.piar_index()
,
time.piar_index()
,
window.piar_index()
index1 <- as_index(matrix(1:6, 2))
index2 <- index1
levels(index2) <- 3:4
merge(index1, index2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.