Re: [R] How to setup the tsp attribute of a dataset

2009-11-20 Thread Samik Raychaudhuri
Looks like there is a difference between when I use frequency(x) vs. when I use frequency(x.ts). If I try to get the tsp attribute of x by using attr(x, "tsp"), it still shows up as NULL. When I looked at the code of frequency() function (in stats), it seems to be looking at attr(x, "tsp"), whi

Re: [R] How to setup the tsp attribute of a dataset

2009-11-20 Thread Samik Raychaudhuri
96 25 97 98 99 100 On Fri, Nov 20, 2009 at 5:53 PM, Samik Raychaudhuri wrote: Hello, I am wondering how I should set up the tsp attribute (available through attr(x, "tsp")) of a dataset x? Let's assume that x has 100 points, and I want to set the frequency to 4

[R] How to setup the tsp attribute of a dataset

2009-11-20 Thread Samik Raychaudhuri
Hello, I am wondering how I should set up the tsp attribute (available through attr(x, "tsp")) of a dataset x? Let's assume that x has 100 points, and I want to set the frequency to 4. I tried: > attr(x,"tsp")<-c(1,100,4) Error in attr(x, "tsp") <- c(1, 100, 4) : invalid time series parameters