Re: [R] Exclude holidays in a subset of dates?

2008-11-19 Thread Diethelm Wuertz
Gabor Grothendieck wrote: There are the timeDate and timeSeries packages with very powerful possibilities to handle weekdays, weekends and public holidays for the G7 countries and CH. You can create your own holiday calenders for many countries including fix and moveable holidays. Note, this

Re: [R] Exclude holidays in a subset of dates?

2008-11-19 Thread Gabor Grothendieck
chron has some facilities for this that also work with "Date" class: library(chron) startDate <- as.Date("2008-08-15") endDate <- as.Date("2008-09-15") AllDays <- seq(startDate, endDate, by="day") Holidays <- as.chron(as.Date("2008-09-01")) is.workday <- !is.holiday(AllDays, Holidays) & !is.weeken

Re: [R] Exclude holidays in a subset of dates?

2008-11-19 Thread hadley wickham
On Wed, Nov 19, 2008 at 12:54 PM, Brigid Mooney <[EMAIL PROTECTED]> wrote: > Hi All, > > I am iterating through dated materials, with variable start and end dates, > and would like to skip procedures everytime I encounter a weekend or > holiday. To do this, I thought the easiest way would be to cr

[R] Exclude holidays in a subset of dates?

2008-11-19 Thread Brigid Mooney
Hi All, I am iterating through dated materials, with variable start and end dates, and would like to skip procedures everytime I encounter a weekend or holiday. To do this, I thought the easiest way would be to create a TRUE/FALSE vector corresponding to each day where it is TRUE if a workday, an