Hi, I am trying to use the stl function in the ts package. It requires that the data is a univariant time series at the moment my data is in a vector. I have coerced it to a time series using.... crimets <- ts(crimeData) However, this does not work. Does anyone have any suggestions? Cheers, Sam. p.s. I am fairly new to R so apologies if this is a stupid posting.
univariant time series
2 messages · Samuel Kemp (Comp), Martin Maechler
"Samuel" == Samuel Kemp (Comp) <sekemp at glam.ac.uk>
on Wed, 14 Jan 2004 13:53:10 +0000 writes:
Samuel> Hi, I am trying to use the stl function in the ts
Samuel> package. It requires that the data is a univariant
Samuel> time series at the moment my data is in a vector. I
Samuel> have coerced it to a time series using....
Samuel> crimets <- ts(crimeData)
Samuel> However, this does not work.
yes, the above usually works IFF 'crimeData' is really a
numeric vector.
Do look at the result of
str(crimeData)
and str(crimets)
In any case ``does not work'' is not informative for us to be of
real help. Did you read the posting guide (mentioned at the end
of every R-help message) ?
Regards,
Martin