Skip to content

univariant time series

2 messages · Samuel Kemp (Comp), Martin Maechler

#
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.
#
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