Learn R Programming

exams.forge (version 1.0.10)

as_ts: Time Series

Description

Converts a ts_data object into a time series object (ts).

Usage

as_ts(ts)

Value

A ts object.

Arguments

ts

ts_data object

Examples

Run this code
# Time series from linear trend
ts <- ts_data(12, trend.coeff= c(sample(0:10, 1), sample(1+(1:10)/20, 1)))
as_ts(ts)

Run the code above in your browser using DataLab