ethanhaas
2007-Dec-12  09:26 UTC
[R] Getting error message using R: Please help (it's coursework due in on Friday)
I've been trying for the past 3 weeks to use R (much better than Matlab but
I
am very bad with computers so I am very new to all of this) and know how to
input the data (hey, it's a start!) but every time I type in the following:
dcm <- decompose(information)
I get the following error message:
Error in decompose(information) : time series has no or less than 3 periods
Could you please aid me so that I can progress to the next step. What I am
in fact trying to do at the moment is plot a graph of the information so I
had assumed it would be:
dcm <- decompose(information)
Plot(dcm$trend)
but obviously it does not appear to be the case.
By the way the code I have right now in case it helps is:
information <- scan("everything.txt")
timeseries <- ts(information, frequency = 11, start = c(1970, 1994))
using <- window(timeseries, end = c(1990, 11))
dcm <- decompose(information)
Plot(dcm$trend)
Thank you very much in advance, I really appreciate the help.
-- 
View this message in context:
http://www.nabble.com/Getting-error-message-using-R%3A-Please-help-%28it%27s-coursework-due-in-on-Friday%29-tp14291568p14291568.html
Sent from the R help mailing list archive at Nabble.com.
Peter Dalgaard
2007-Dec-12  10:14 UTC
[R] Getting error message using R: Please help (it's coursework due in on Friday)
ethanhaas wrote:> I've been trying for the past 3 weeks to use R (much better than Matlab but I > am very bad with computers so I am very new to all of this) and know how to > input the data (hey, it's a start!) but every time I type in the following: > > dcm <- decompose(information) > > I get the following error message: > > Error in decompose(information) : time series has no or less than 3 periods > > Could you please aid me so that I can progress to the next step. What I am > in fact trying to do at the moment is plot a graph of the information so I > had assumed it would be: > > dcm <- decompose(information) > Plot(dcm$trend) > > but obviously it does not appear to be the case. > > By the way the code I have right now in case it helps is: > > information <- scan("everything.txt") > timeseries <- ts(information, frequency = 11, start = c(1970, 1994)) > using <- window(timeseries, end = c(1990, 11)) > dcm <- decompose(information) > Plot(dcm$trend) > >Er, are you sure it is "information" that you want to decompose()? (If so, what are the computations of "timeseries" and "using" supposed to be good for?)> Thank you very much in advance, I really appreciate the help. >-- O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907