# [R-sig-finance] Problems with monthly sequences

Diethelm Wuertz wuertz at itp.phys.ethz.ch
Sun Feb 5 02:45:31 CET 2006

```Many thanks to Gabor for this comment.

For calendar tasks I have written a report (44 pages)  which may be
many calendar manipulations using Rmetrics. Here is the link:

http://www.itp.phys.ethz.ch/econophysics/R/pdf/calendar.pdf

You can also access this "timeDate and timeSeries" white pages from the

regards

Diethelm

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)
>
>
>On 2/4/06, Wojciech Slusarski <wojciech.slusarski at gmail.com> wrote:
>
>
>>Dear R users,
>>
>>Could anyone help me with creating a monthly series of dates?
>>When I try to do:
>>
>>dates = timeSequence(from = "2005-12-31", to = "2006-12-31", format =
>>"%Y-%m-%d", by="month", FinCenter = "Europe/Warsaw")
>>
>>I get:
>>
>>
>>
>>>dates
>>>
>>>
>>[1] "Europe/Warsaw"
>> [1] [2005-12-31] [2006-01-31] [2006-03-03] [2006-03-31] [2006-05-01]
>> [6] [2006-05-31] [2006-07-01] [2006-07-31] [2006-08-31] [2006-10-01]
>>[11] [2006-10-31] [2006-12-01] [2006-12-31]
>>
>>Unfourtunately, I would like to heave end of month at each point.
>>I thought, that maybe using this function would also help when trying to add
>>a month to a date. I would like to have
>>
>>"2006-01-31" + 1M = "2006-02-28"
>>
>>in MS EXCEL I would use EDATE("2006-01-31";1), and that would work. I
>>couldn't find any similar function in R for that. Am I missing some
>>function?
>>
>>Best regards,
>>Wojtek
>>
>>       [[alternative HTML version deleted]]
>>
>>_______________________________________________
>>R-sig-finance at stat.math.ethz.ch mailing list
>>https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>>
>>
>>
>
>_______________________________________________
>R-sig-finance at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>
>
>

```