Re: [Rd] seq.Date bug?

From: Dirk Eddelbuettel <edd_at_debian.org>
Date: Tue, 31 Jan 2012 14:50:07 -0600

On 31 January 2012 at 15:28, Sarah Goslee wrote:
| As Duncan pointed out, this is documented in ?seq.POSIXt:
|
| Using ‘"month"’ first advances the month without changing the day:
| if this results in an invalid day of the month, it is counted
| forward into the next month: see the examples.
|
| But ?seq.Date gives the impression that the construct Dirk and I tried
| should work:
|
| ## find all 7th of the month between two dates, the last being a 7th.
| st <- as.Date("1998-12-17")
| en <- as.Date("2000-1-7")
| ll <- seq(en, st, by="-1 month")
| rev(ll[ll > st & ll < en])
|
| is given as an example, and it is not pointed out that this won't work for
| the 30th of the month. Normally one can extrapolate from patterns given
| in the examples, and here that isn't true. So perhaps the help should
| be modified slightly instead?

Yup, that would indeed help with this "infelicity".

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

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Tue 31 Jan 2012 - 20:52:10 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