powered by
Transforms a ts_data object into a standard R ts (time series) object.
ts_data
ts
as_ts(ts)
A ts object representing the same time series as the input ts_data.
A ts_data object containing the time series values and structure.
The function preserves the original time indices and frequency of the input ts_data. It calculates the deltat based on the time vector t in ts_data.
deltat
t
# Create a ts_data object with a linear trend ts_obj <- ts_data(12, trend.coeff = c(sample(0:10, 1), sample(1 + (1:10)/20, 1))) # Convert to standard ts object ts_standard <- as_ts(ts_obj)
Run the code above in your browser using DataLab