Dirk Eddelbuettel
2010-Jan-30 17:26 UTC
[R-sig-Debian] Can I install debs over packages installed via R?
[ Kevin sent this to me but agreed that it's better to have this discussed here. ] On 30 January 2010 at 12:18, Kevin Donnelly wrote: | Hi | | I'm beginning to learn R,a nd I've just discovered cran2deb - what a terrific | resource! Thanks for making it. | | I was wondering what happens if I want to use cran2deb versions instead of the | versions installed via R itself. I'm on Ubuntu 9.10, and the package | versions go into /usr/lib/R/library, while the R versions go | into /usr/local/lib/R/site-library. Is it OK just to delete them from the | site-library, and reinstall from cran2deb? 1) These are different locations, so there is no conflict. 2) R looks at the variables R_LIBS (or rather, R_LIBS_SITE and R_LIBS_USER). On Debian/Ubuntu, R_LIBS is set in /etc/R/Renviron to # edd Apr 2003 Allow local install in /usr/local, also add a directory for # Debian packaged CRAN packages, and finally the default dir # edd Jul 2007 Now use R_LIBS_SITE, not R_LIBS R_LIBS_SITE=${R_LIBS_SITE-'/usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library'} 3) This means /usr/local/lib/R/site-library is first and hence the default, so both 'R CMD INSTALL foo_1.2-3.tar.gz' and install.packages("foo") install here. This is where R puts things. /usr/lib/R/site-library is where most r-cran-* packages go /usr/lib/R/library is where base and recommended r-cran-* packages (ie those shipped with R sources) go 4) You have no conflict, but if you have a library 'foo' in several directories, the first one found wins. 5) On Debian, and thanks to cran2deb, I personally keep almost everything in /usr/lib/R/site-library as I use cran2deb _a lot_. /usr/local is only for unpackage code, or things I install directly from SVN, or ... 6) On Ubuntu, I tend to rely on install.packages() and R CMD INSTALL and the packages go into /usr/local/lib/R/site-library. I do not use cran2deb on Ubuntu. Other folks may have other recommendations. Liviu seems to live happly with cran2deb on Ubuntu. You can try it but ... buy beware. Hope this helps, Dirk -- Three out of two people have difficulties with fractions.
Liviu Andronic
2010-Jan-30 21:03 UTC
[R-sig-Debian] Can I install debs over packages installed via R?
On Sat, Jan 30, 2010 at 5:26 PM, Dirk Eddelbuettel <edd at debian.org> wrote:> Other folks may have other recommendations. Liviu seems to live happly with > cran2deb on Ubuntu. You can try it but ... buy beware. >Quick correction. :) I use Debian testing as my primary system, so it's there that I install cran2deb packages. (I open Ubuntu once a year, need-based.) I remember reading on this list, though, people using cran2deb on Ubuntu. Regards Liviu
Michael Dewey
2010-Jan-31 15:27 UTC
[R-sig-Debian] Doc suggestion, was Re: Can I install debs over packages installed via R?
At 17:26 30/01/2010, Dirk Eddelbuettel wrote: A lot of useful things and then>3) This means > > /usr/local/lib/R/site-library is first and hence the default, so > both 'R CMD INSTALL foo_1.2-3.tar.gz' > and install.packages("foo") > install here. > This is where R puts things. > > /usr/lib/R/site-library is where most r-cran-* packages go > > /usr/lib/R/library is where base and > recommended r-cran-* > packages (ie those shipped > with R sources) > go >Could I suggest that this information be put in the readme page which comes up on CRAN when you click on binaries and then on debian? I did eventually work out two thirds of it myself but my desire to know where things are being put vastly outstrips my ability to work it out for myself.>Hope this helps, DirkIt certainly did.>-- >Three out of two people have difficulties with fractions. > >_______________________________________________ >R-SIG-Debian mailing list >R-SIG-Debian at r-project.org >https://stat.ethz.ch/mailman/listinfo/r-sig-debianMichael Dewey http://www.aghmed.fsnet.co.uk
Seemingly Similar Threads
- Renviron settings for Linux Distributions: please tell me R Core's advice
- R CMD check --as-cran attempts to hide R_LIBS_USER but fails
- Improving RPM packaging for R; ideas gathered from the Debian folks
- How to go about getting a change in the SPEC file from which R is built on EPEL?
- R CMD check --as-cran attempts to hide R_LIBS_USER but fails