[Rd] seq improperly increments dates (PR#9120)
stephen.ponzio at citigroup.com
stephen.ponzio at citigroup.com
Thu Aug 3 16:26:38 CEST 2006
Full_Name: Stephen Ponzio
Version: 2.3.1
OS: Windows
Submission from: (NULL) (199.67.138.42)
With the option by="1 month" and a date that is the 31st,
the function seq doesn't give the last day of successive months,
as I would expect it should:
> Sys.Date()
[1] "2006-08-03"
> Sys.Date()-3
[1] "2006-07-31"
# WORKS OK on Aug. 1:
> seq(Sys.Date()-2, len=5, by="1 month")
[1] "2006-08-01" "2006-09-01" "2006-10-01" "2006-11-01" "2006-12-01"
# DOESN'T WORK on July 31 (list has no date in Sept):
> seq(Sys.Date()-3, len=5, by="1 month")
[1] "2006-07-31" "2006-08-31" "2006-10-01" "2006-10-31" "2006-12-01"
More information about the R-devel
mailing list