[R] Bug in seq.date?

hadley wickham h.wickham at gmail.com
Mon Jun 4 09:39:21 CEST 2007


> seq(as.Date("2000-1-1"), as.Date("2001-1-1"), "months")
 [1] "2000-01-01" "2000-02-01" "2000-03-01" "2000-04-01" "2000-05-01"
 [6] "2000-06-01" "2000-07-01" "2000-08-01" "2000-09-01" "2000-10-01"
[11] "2000-11-01" "2000-12-01" "2001-01-01"


> seq(as.Date("2000-1-31"), as.Date("2001-1-31"), "months")
 [1] "2000-01-31" "2000-03-02" "2000-03-31" "2000-05-01" "2000-05-31"
 [6] "2000-07-01" "2000-07-31" "2000-08-31" "2000-10-01" "2000-10-31"
[11] "2000-12-01" "2000-12-31" "2001-01-31"

Is this a bug?

Hadley



More information about the R-help mailing list