[R-sig-finance] (i) bug report in listFinCenter and (ii) question
Dirk Eddelbuettel
edd at debian.org
Wed Oct 5 03:01:13 CEST 2005
Hi,
On 4 October 2005 at 14:46, Parlamis Franklin wrote:
| Hello all.
|
| I am using the Mac OS X version of R (Aqua GUI 1.12, R Framework
| 2.1.1).
|
| (i) The function 'listFinCenter' in the fCalendar package does
| not work. Having checked the code of that function it appears the
| problem is in the passing of the '*' regular expression pattern to
| the R grep function. R complains that this is not a valid regular
| expression. I am not sure whether this bug is the result of more
| liberal regular expression matching on the Windows platform (on which
| fCalendar has been exclusively tested) than on UNIX, or whether it
| results from the fact that R, as of version 2.1.0, has switched its
| standard for regular expression matching to glibc 2.3.3 from grep 2.4.2.
|
| In any event, I have found that replacing the pattern '*' with
| the pattern '.*' will do the trick (although I must admit the entire
| grep call seems a bit superfluous to me--perhaps the function was
| originally intended to do more than it currently does).
I think Diethelm listens in here, so he may pick this up. If all else fails
you can always send bug reports to the package author/maintainer :)
| (ii) As we all know by now, fCalendar needs the TZ environment
| variable to be set to 'GMT'. However, as installed on my Mac, a
| Sys.getenv() call returned no environment variable named TZ. My
| solution was to use Sys.putenv() in my .Rprofile file to initialize
| and set the TZ variable to 'GMT'. This stopped the program from
| complaining, but I am a bit concerned that the solution will not be a
| complete one. My system clock is still set to my local time zone and
| daylight savings rules, so that other programs in other environments
| on my system know the time to be different than R. Does anyone
| foresee a problem with this workaround? Is there a better way?
I think that is a fair solution as .Rprofile should only affect R, and
processes spawned by R, if any. So it should _not_ spill over to other
apps.
We have the same issue on Debian where timezone behaviour is controlled by
the file /etc/timezone, and TZ is unset by default. I also wish the code in
fCalendar (and similarly in its and other packages using timezone info) was
smarter amd set a default as fallback.
Best regards, Dirk
--
Statistics: The (futile) attempt to offer certainty about uncertainty.
-- Roger Koenker, 'Dictionary of Received Ideas of Statistics'
More information about the R-sig-finance
mailing list