GithubHelp home page GithubHelp logo

Comments (3)

eddelbuettel avatar eddelbuettel commented on June 25, 2024

It is on purpose as we do not want to install everything twice.

The other three entries are the standard Debian layout we had since 2003 or so and which is documented elsewhere.

from rocker.

eddelbuettel avatar eddelbuettel commented on June 25, 2024

@wch here is a brief 'what is where and why'

  • /usr/local/lib/R/site-library/: Packages installed by the user, and we share this on purpose between R and Rdevel.
  • /usr/lib/R/site-library/: By convention, use for .deb package not part of Base R. We just don't have any installed in this image, as soon as you apt-get or dpkg one you see it here
  • /usr/lib/R/library/: As you noted, base packages for R installed via .deb like r-cran-mass.
  • /usr/local/lib/R/library/ The build-local directory for Rdevel.

I consider the Docker containers to be 'temporary' enough so that one focused on R-devel will see use primarily of R-devel -- so this version of R can easily re-use earlier/other packages from R-release. This strikes me as easier and more lightweight than forcing each package in twice. Which you can still do simply by changing the .libPath() -- but this strikes me as a worse default.

from rocker.

wch avatar wch commented on June 25, 2024

@eddelbuettel thanks for the explanation. The rationale for sharing /usr/local/lib/R/site-library makes sense (especially with the idea that containers are disposable), though it does result in the occasional problem where a package installed in one version of R is broken in another version.

You could still allow packages installed on R-release to be used on R-devel, while also ensuring that packages installed on R-devel aren't used on R-release, by setting the libpath to: /usr/local/lib/R/site-library-devel, /usr/local/lib/R/site-library, /usr/local/lib/R/library, /usr/lib/R/library. This seems to me to be a better strategy, and the cost is negligible.

We've been bitten by R version changes in the past: when R 3.0.1 was released and CRAN started building binary packages on it, any package that contained reference class objects (including Shiny) would no longer run on R 3.0.0. This is because in R 3.0.1, they added and used a function named .setDummyField: https://github.com/SurajGupta/r-source/blame/master/src/library/methods/R/refClass.R#L748. If you google for that string, you'll see a lot of references to problems that people had.

But as you said, this isn't a huge deal if you treat the containers as disposable, so I don't feel super strongly about it.

from rocker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.