Learn R Programming

dsa (version 1.0.12)

xts2ts: Change xts to ts

Description

Change the format of a time series from xts to ts. Has been optimised for the use in dsa(), i.e. for daily time series.

Usage

xts2ts(series, freq = NULL)

Arguments

series

xts series to be changed to ts

freq

frequency of ts series

Details

This function is used internally in dsa(). Does not create values for the 29th of February.

Examples

Run this code
# NOT RUN {
xts2ts(xts::xts(rnorm(1095, 10,1), seq.Date(as.Date("2010-01-01"), length.out=1095, by="days")))
# }

Run the code above in your browser using DataLab