[R-sig-finance] Problems with monthly sequences

Vivek Satsangi vivek.satsangi at gmail.com
Sun Feb 5 13:18:44 CET 2006


1. Why does subtracting 3600*24 (seconds, I presume) in DW's solution work?

2. Does anyone who uses gmail and gets this  DL's emails in digest
form have a good method for responding to just one message (I use
reply/edit subject/delete everything from the quoted material except
for the message I want to respond to -- That's obviously not much fun
when trying to respond to an r-help message for which the digest can
be long, and where one can end up fat-fingering the cut&paste of the
message (thus breaking the thread. )


> Gabor Grothendieck wrote:
>
> >Try this:
> >
> >library(fCalendar)
> >dates <- timeSequence(from = "2005-12-1", to = "2006-12-1", format =
> >"%Y-%m-%d", by="month", FinCenter = "Europe/Warsaw")
> >dates <- timeLastDayInMonth(dates)
> >
> >
> Alternatively you can use
>
>  > timeSequence(from = "2006-01-01", to = "2007-01-01", format =
> + "%Y-%m-%d", by="month", FinCenter = "Europe/Warsaw") - 3600*24
> [1] "Europe/Warsaw"
>  [1] [2005-12-31] [2006-01-31] [2006-02-28] [2006-03-31] [2006-04-30]
>  [6] [2006-05-31] [2006-06-30] [2006-07-31] [2006-08-31] [2006-09-30]
> [11] [2006-10-31] [2006-11-30] [2006-12-31]
>
> Please use proper ISO-8601 notation: 2006-01-05 and not 2006-1-5 !
>
> DW
>
[Other quoted messages deleted]
--
-- Vivek Satsangi
Student, Rochester, NY USA



More information about the R-sig-finance mailing list