Learn R Programming

tsibble (version 1.1.5)

as.ts.tbl_ts: Coerce a tsibble to a time series

Description

[Stable]

Usage

# S3 method for tbl_ts
as.ts(x, value, frequency = NULL, fill = NA_real_, ...)

Value

A ts object.

Arguments

x

A tbl_ts object.

value

A measured variable of interest to be spread over columns, if multiple measures.

frequency

A smart frequency with the default NULL. If set, the preferred frequency is passed to ts().

fill

A value to replace missing values.

...

Ignored for the function.

Examples

Run this code
# a monthly series
x1 <- as_tsibble(AirPassengers)
as.ts(x1)

Run the code above in your browser using DataLab