On 13-12-15 6:43 AM, 水静流深 wrote:
seq(as.Date("2001/1/1"),as.Date("2010/1/1"),"years")
seq(as.Date("2001/1/1"),as.Date("2010/1/1"),"weeks")
seq(as.Date("2001/1/1"),as.Date("2010/1/1"),"days")

why there is no
seq(as.Date("2001/1/1"),as.Date("2010/1/1"),"quarters")  ?

There's no need for it.  Just use months, and take every 3rd one:
        
x <- seq(as.Date("2001/1/1"),as.Date("2010/1/1"),"months")
x[seq_along(x) %% 3 == 1]

______________________________________________
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