Skip to content

problem when both fCalendar and chron packages are loaded

4 messages · Parlamis Franklin, Gabor Grothendieck, Spencer Graves +1 more

#
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
#
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:
\
#
I've seen the same problem under (if I remember correctly) R 2.1.1 
patched, Windows XP.

	  spencer graves
Parlamis Franklin wrote:

            

  
    
5 days later
#
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 ...

-k