Summary: | install add-on packages for dev-lang/R using package managers | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Gábor BORGULYA <bugzilla> |
Component: | Current packages | Assignee: | Gentoo Science Mathematics related packages <sci-mathematics> |
Status: | RESOLVED WONTFIX | ||
Severity: | enhancement | CC: | auke, vanquirius |
Priority: | High | Keywords: | SOCIDEAS |
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
URL: | http://cran.r-project.org/doc/FAQ/R-FAQ.html#R-Add_002dOn-Packages | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Gábor BORGULYA
2005-06-20 05:02:00 UTC
This would be a valuable addition to Gentoo. R is central to a lot of scientific and statistical work, and is probably the premier open source statistics and scientific graphics package. R's own package handling system is ok, (though it is much easier to use on MS Windows) including for example, semi-automatic updates. R currently has at least three package repositories (CRAN, Bio-Conductor and Omega-Hat), and it would be necessary to support the first two anyway. Also, note that R, that is the basic R from gentoo, comes with the base packages installed already. R with no packages does very little, kind of like Apache with no modules. Most of R's key functions are in packages, and these always need perl, and commonly need C or Fortran (g77 not f2c!). I use perl a lot, and I really like the Gentoo approach to perl modules. Something similar for R packages woud be very useful. I would be happy to test. Details follow from CRAN (to save you looking it up):- 5.2 How can add-on packages be installed? (Unix only.) The add-on packages on CRAN come as gzipped tar files named pkg_version.tar.gz, which may in fact be This would be a valuable addition to Gentoo. R is central to a lot of scientific and statistical work, and is probably the premier open source statistics and scientific graphics package. R's own package handling system is ok, (though it is much easier to use on MS Windows) including for example, semi-automatic updates. R currently has at least three package repositories (CRAN, Bio-Conductor and Omega-Hat), and it would be necessary to support the first two anyway. Also, note that R, that is the basic R from gentoo, comes with the base packages installed already. R with no packages does very little, kind of like Apache with no modules. Most of R's key functions are in packages, and these always need perl, and commonly need C or Fortran (g77 not f2c!). I use perl a lot, and I really like the Gentoo approach to perl modules. Something similar for R packages woud be very useful. I would be happy to test. Details follow from CRAN (to save you looking it up):- 5.2 How can add-on packages be installed? (Unix only.) The add-on packages on CRAN come as gzipped tar files named pkg_version.tar.gz, which may in fact be bundles containing more than one package. Provided that tar and gzip are available on your system, type $ R CMD INSTALL /path/to/pkg_version.tar.gz at the shell prompt to install to the library tree rooted at the first directory given in R_LIBS (see below) if this is set and non-null, and to the default library (the library subdirectory of R_HOME) otherwise. (Versions of R prior to 1.3.0 installed to the default library by default.) To install to another tree (e.g., your private one), use $ R CMD INSTALL -l lib /path/to/pkg_version.tar.gz where lib gives the path to the library tree to install to. Even more conveniently, you can install and automatically update packages from within R if you have access to CRAN. See the help page for CRAN.packages() for more information. You can use several library trees of add-on packages. The easiest way to tell R to use these is via the environment variable R_LIBS which should be a colon-separated list of directories at which R library trees are rooted. You do not have to specify the default tree in R_LIBS. E.g., to use a private tree in $HOME/lib/R and a public site-wide tree in /usr/local/lib/R-contrib, put R_LIBS="$HOME/lib/R:/usr/local/lib/R-contrib"; export R_LIBS into your (Bourne) shell profile or even preferably, add the line R_LIBS="~/lib/R:/usr/local/lib/R-contrib" your ~/.Renviron file. (Note that no export statement is needed or allowed in this file; see the on-line help for Startup for more information.) [SNIP] 5.4 How can add-on packages be removed? Use $ R CMD REMOVE pkg_1 ... pkg_n to remove the packages pkg_1, ..., pkg_n from the library tree rooted at the first directory given in R_LIBS if this is set and non-null, and from the default library otherwise. (Versions of R prior to 1.3.0 removed from the default library by default.) To remove from library lib, do $ R CMD REMOVE -l lib pkg_1 ... pkg_n Should the internal R package handling work, it would still be ok. Troublesome but OK. HOWEVER IT DOES NOT!!! Having installed R-2.2.0 with portage, this is what I get when I try to install an additional package: /usr/lib/R/bin/INSTALL: line 119: /var/tmp/portage/R-2.2.0/image//usr/lib/R/share/sh/dcf.sh: No such file or directory Apparently, R keeps registered the build directory as its $R_HOME and even when exported in the shell as the correct /usr/lib/R before executing the installation command, R stubbornly IGNORES it and even tells you so! # export R_HOME="/usr/lib/R/"; R CMD INSTALL /home/erebus/Rcmdr_1.1-4.tar.gz WARNING: ignoring environment value of R_HOME /usr/lib/R/bin/INSTALL: line 119: /var/tmp/portage/R-2.2.0/image//usr/lib/R/share/sh/dcf.sh: No such file or directory I can only add that this is getting extremely frustrating! Solution to the problem above described submitted as bug #115430 As I think you have already discovered dev-lang/R-2.2.0-r1 fixes this issue already - please report if you have any further issues. I think in most cases using the R package management should work fine, but may be we should consider an ebuild for what might be considered very useful packages as a tarball? I would be interested on thoughts and whether this would clash with the R system in place already. The bug has already been addressed in bug 115140 - I thought that was what you were referring to. I have a patch for sys-apps/paludis to understand and use CRAN repositories. You can find it at http://dev.gentoo.org/~kugelfang/gentoo/misc/paludis-cran-repo.patch now a Gentoo Google Summer of Code, cc-ing the student. I'm going to close this bug. While this idea pops up once in a while, producing ebuilds for CRAN packages seems like a pipe-dream. The upkeep required to make this tractable is insurmountable in practice (just look at python and how we're struggling to keep stuff updated). Ideas are welcome, but they need to be fleshed out and tractable, and to date none have been so far. |