[R-sig-finance] problem when both fCalendar and chron packages are loaded

Kurt Hornik Kurt.Hornik at wu-wien.ac.at
Tue Oct 18 12:37:00 CEST 2005

>>>>> Gabor Grothendieck writes:

> If you don't need the shift= argument in easter then a workaround
> would be:

> my.easter <- function(year) structure(.easter.sunday(year), "sdate")

> which does not depend on any masked functions.

> On 10/12/05, Parlamis Franklin <fparlamis at mac.com> wrote:
>> When both the fCalendar and chron packages are loaded, the function
>> easter(2005) returns the following object of class sdate:
>> [1] 'myFinCenter'
>> [2] [2015-03-28]
>> If the chron package is unloaded, the result becomes correct.  this
>> must be related to the following message which appears when attaching
>> chron:
>> "The following object(s) are masked from package:fCalendar :
>> day.of.week leap.year month.day.year"
>> It may also be related to sometimes differing origins for the julian
>> calendar functions (I have alternately seen 1960-01-01 and 1970-01-01
>> as the origin).
>> I cc'd the chron package maintainer.  I am hoping Diethelm, the
>> fCalendar package manager, picks up this list as well.
>> Franklin Parlamis

Why is that a problem with chron?

Package chron has its functions month.day.year() etc, and fCalendar has
different added ones, but in case chron is loaded on top picks up the
ones from chron.  Seems like fCalendar needs a name space, and it would
not hurt providing one for chron either ...


More information about the R-sig-finance mailing list