Can not install fCalendar package under R 2.6.2
Dear Prof Brian Ripley and other R guru: Very happy to receive your help. Actually what I use is 262.73. In detail, what I have been doing is the following: First I have a not-up-to-dated R 2.4.0 under ubuntu 7.04, then I tried to install fCalendar(what I really want to use is fGarch, but it depends on fCalendar), I use install.packages to do it, so the fCalendar packages I had downloaded is up to dated 262.73(I also have checked it to make sure), then R reported a strange error, saying it found a syntax error-a parse error at line 122 and 123 something. It's a pity I did not copy that down. Then I found that my R is old, so I upgraded it to 2.6.2 with apt-get and tried it again. The situation improved, it did not say it has difficulty parsing any more, but it reported the error I have posted. Another thing is that I have a R 2.5.1 under windows, yesterday I tried to use install.packages to install fCalendar under it, and everything worked smoothly, it was a success, no problem whatsoever. As a common R user, I am not capable of debugging it. I hope R gurus like prof Brian Ripley could have a closer look at my problem. Thanks a lot! Yan Wang Georgia Institute of Technology School of Industrial and Systems Engineering E-mail address: ywang67 at isye.gatech.edu
On Sun, 23 Mar 2008, Prof Brian Ripley wrote:
I suspect you have a rather old version of the fCalendar package (or possibly of one of the packages it loads). The current version is 262.73 and does not use putenv or Sys.putenv. (Packages really should not be using global system settings but the current version does
.currentYear
function ()
{
TZ <- Sys.getenv("TZ")
if (TZ[[1]] != "GMT") {
Sys.setenv(TZ = "GMT")
on.exit(Sys.setenv(TZ = TZ))
}
as.POSIXlt(Sys.time())$year + 1900
}
whereas as.POSIXlt has a 'tz' argument. I also don't see the point of
recording the current year *when the package is installed*: a comment says
this is done in '.Firstlib' but it is not done in .First.lib.)
On Sat, 22 Mar 2008, Yan Wang wrote:
Dear R helper: When I was trying to install the fCalendar package, R report the following error and then my installation failed: * Installing *source* package 'fCalendar' ... ** R ** inst ** preparing package for lazy loading Loading required package: MASS Loading required package: fEcofin Loading required package: fUtilities Loading required package: RUnit RUnit 0.4.17 loaded. Loading required package: spatial Loading required package: tcltk Loading Tcl/Tk interface ... done Loading required package: zoo Error in .Internal(putenv(x)) : no internal function "putenv" Calls: <Anonymous> ... sys.source -> eval -> eval -> .currentYear -> Sys.setenv Execution halted ERROR: lazy loading failed for package 'fCalendar' ** Removing '/usr/local/lib/R/site-library/fCalendar' by the way, my system is Ubuntu 7.04, platform i486-pc-linux-gnu arch i486 os linux-gnu system i486, linux-gnu I tried to look for putenv myself, R reported that it is a deprecated function in "base" package, I loaded the "base" package and still end up with the same Error report.
It is Sys.putenv that is deprecated. The internal function putenv went in R 2.5.0.
Pls do help me. Yan Wang Georgia Institute of Technology School of Industrial and Systems Engineering E-mail address: ywang67 at isye.gatech.edu
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595