[R] I'm trying to use package ts (decompose). How do you set up the data/ See attached. thanks

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Apr 29 13:13:55 CEST 2004

Package ts in R contains no functionality, it having been moved to package 
stats.  The function ts() was not in package ts in older versions either.

I have no idea what your data refer to (quarters, probably, but of which 
years?).  Assumming you know the time base, see the help page ?ts for how 
to create a time series.

BTW, read.table is intended for reading a table, not a single variable, 
and scan() might be easier.

On Thu, 29 Apr 2004, Briggs, Meredith M wrote:

> InDATA <-read.table("C:/Data/May 2004/season.txt",header=T)
> X <- decompose(InDATA)
> print(X)


Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-help mailing list