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. Pls do help me. Yan Wang Georgia Institute of Technology School of Industrial and Systems Engineering E-mail address: ywang67 at isye.gatech.edu
I have previously sent a same email to r-help at list.r-project.org, however I am not sure if the mailing address has been changed to this one. If the duplicated messages are received twice, I am sorry for that and please delete one of them. 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. Pls do help me. Yan Wang Georgia Institute of Technology School of Industrial and Systems Engineering E-mail address: ywang67 at isye.gatech.edu
Prof Brian Ripley
2008-Mar-23 07:03 UTC
[R] Can not install fCalendar package under R 2.6.2
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> .currentYearfunction () { 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