Skip to contents

Internal function to wrap a zoo object into a time series list.

Usage

zoo_to_tsl(x = NULL)

Arguments

x

(required, zoo object) Time series. Default: NULL

Value

time series list of length one.

Examples

#create zoo object
x <- zoo_simulate()
class(x)
#> [1] "zoo"

#to time series list
tsl <- zoo_to_tsl(
  x = x
)

class(tsl)
#> [1] "list"
class(tsl[[1]])
#> [1] "zoo"
names(tsl)
#> [1] "A"
attributes(tsl[[1]])$name
#> [1] "A"