[R-SIG-Finance] Conversion of xts to ts object
Nikos Rachmanis
nikos.rachmanis at gmail.com
Sun Jan 27 11:33:22 CET 2013
Hi all,
I am trying to convert a xts to ts object in order to use with
decompose() and forecast() functions.
I am currently using the following command which works:
tsdata<-ts(tradedata$dif,frequency=252)
where tradedata is the xts object.
I would feel more comfortable if i did not have to set the trading days
in advance cause I am dealing with many years of daily data. I have
search the internet but most people suggest similar ways.
Has anyone come across this problem?
Thank you,
Nikos
More information about the R-SIG-Finance
mailing list