View source: R/time.piar_index.R
| time.piar_index | R Documentation |
Methods to get and set the time periods for a price index.
## S3 method for class 'piar_index'
time(x, ...)
time(x) <- value
## S3 replacement method for class 'piar_index'
time(x) <- value
set_time(x, value)
## S3 method for class 'piar_index'
start(x, ...)
## S3 method for class 'piar_index'
end(x, ...)
ntime(x)
x |
A price index, as made by, e.g., |
... |
Not currently used. |
value |
A character vector, or something that can be coerced into one,
giving the replacement time periods for |
time() returns a character vector with the time periods for a price index.
start() and end() return the first and last time period.
ntime() returns the number of time periods, analogous to nlevels().
The replacement method returns a copy of x with the time periods in
value. (set_time() is an alias that's easier to use with pipes.)
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,
merge.piar_index(),
split.piar_index(),
stack.piar_index(),
window.piar_index()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.