Re: [R] Can not install fCalendar package under R 2.6.2

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Sun, 23 Mar 2008 07:03:17 +0000 (GMT)

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

______________________________________________
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.
Received on Sun 23 Mar 2008 - 07:08:50 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 23 Mar 2008 - 18:30:23 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive