[R] ts command and stl function

d d sutcliffe@durham ac uk d.d.sutcliffe at durham.ac.uk
Wed Jul 12 15:05:45 CEST 2006


Hi,

I have imported a csv file into R which contains one column (the rate er 
100,000 population of a disease, by month over 11 years) I coerced into 
a time series using the following function,

tstkr<-ts(tkr,deltat=1/12)

This seems to work fine, and when I check for the class of the object 
using class(tstkr) I get "ts" as the response.

When I try to use the stl function in stats I get the error message:

Error in stl(tstkr)only univariate series are allowed

I then tried this:

tstkr <- ts(c(tkr), deltat=1/12)

however this made no difference...I still get an error - does anybody 
know what is wrong?

Regards,

Daniel



More information about the R-help mailing list