Skip to contents

Methods to get and set the time periods for a price index.

Usage

# S3 method for piar_index
time(x, ...)

time(x) <- value

# S3 method for piar_index
time(x) <- value

# S3 method for piar_index
start(x, ...)

# S3 method for piar_index
end(x, ...)

ntime(x)

Arguments

x

A price index, as made by, e.g., elemental_index().

...

Not currently used.

value

A character vector, or something that can be coerced into one, giving the replacement time periods for x.

Value

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.