Hi, 
I have a dataset including monthly date from 1971-01-01 to 2009-01-01. The 
dates are character variables.

I want to select the subsample from my original data, so I use
mydata3<-window(mydata,start="1972-02-01",end="2005-02-01"),
or mydata3<-window(mydata, 
start=as.date("1972-02-01"),end=as.date("2005-02-01"))
or mydata3<-window(mydata, start=c(1972-02-01),end=c(2005-02-01))

but I constantly receive 
Error in attr(x, "tsp") <- c(1, NROW(x), 1) : 
  invalid time series parameters specified

I don't know how to fix it in this case.

Many thanks 
YD



        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to