[Rd] seq.Date bug?

From: Dirk Eddelbuettel <edd_at_debian.org>
Date: Tue, 31 Jan 2012 13:56:36 -0600

R> seq(as.Date(Sys.Date()), by="-1 months", length=6) [1] "2012-01-31" "2011-12-31" "2011-12-01" "2011-10-31" "2011-10-01" "2011-08-31" R>

Notice how October appears twice.

Now, date arithmetic is gruesome but the documentation for seq.Date et al does not hint it wouldn't honour the by= argument. So a bug, or merely a somewhat less than desirable features.

(And yes, I think I know that Hadley's lubridate has code for this too, but so may my RcppBDT which is sitting on top of Boost::DateTime code ...)


"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
dark to read." -- Groucho Marx

R-devel_at_r-project.org mailing list
Received on Tue 31 Jan 2012 - 20:00:09 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 31 Jan 2012 - 23:30:12 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive