blockLength <- 37 # can be anything you like ts1 <- ts(rnorm(2*blockLength-1, 0,2), frequency=blockLength) de <- decompose(ts1) # error
ts2 <- ts(rnorm(2*blockLength, 0,2), frequency=blockLength) de <- decompose(ts2) plot(de) So the trick is to have at least two periods in your time series. Even reduce one data point, and you will see this error.
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.