From edd at debian.org  Tue Jan 31 20:56:36 2012
From: edd at debian.org (Dirk Eddelbuettel)
Date: Tue, 31 Jan 2012 13:56:36 -0600
Subject: [Rd] seq.Date bug?
Message-ID: <20264.18292.474587.518409@max.nulle.part>


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

Dirk

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



[Rd] seq.Date bug?
Dirk Eddelbuettel