Skip to contents

Turn an index into a regular time series, represented as a ts object.

Usage

# S3 method for class 'piar_index'
as.ts(x, ...)

Arguments

x

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

...

Additional arguments passed to ts().

Value

A time series object.

Examples

as.ts(as_index(matrix(1:9, 3)))
#> Time Series:
#> Start = 1 
#> End = 3 
#> Frequency = 1 
#>   1 2 3
#> 1 1 2 3
#> 2 4 5 6
#> 3 7 8 9