[Rd] [R] Why Rprofile.site is not built with manual installation of R devel in linux?

Iago Giné Vázquez |@go@g|ne @end|ng |rom @jd@e@
Fri Nov 10 17:06:02 CET 2023


Thanks all for your answers.

First of all, I wrote to R-help and not R-devel, because I wanted to get help and not discussing anything relative to R development, and also because this issue could be due to my fault (as it was indeed), and not to the R devel branch...

Thanks particularly to Martin, because one of his comments enlighten the issue with my tests.


You must have forgotten to tell us a bit more about your setup.
I never get the above error,
and I do *not* have an  Rprofile.site  either in my  <build-R>/etc/

Have you by chance set an R_LIBS_SITE or similar environment
variable ?
Does
        env | grep '^R_'

give a hint?

Indeed, I had a ~/.Rprofile file sourcing the Rprofile.site file of Debian stable installation, so changing its name made the issue to vanish.

Iago

________________________________
De: Dirk Eddelbuettel <edd using debian.org>
Enviat el: divendres, 10 de novembre de 2023 14:41
Per a: Martin Maechler <maechler using stat.math.ethz.ch>
A/c: Iago Gin� V�zquez <iago.gine using sjd.es>; R-SIG-debian using r-project.org <R-SIG-debian using r-project.org>; r-devel using r-project.org <r-devel using r-project.org>; Jeff Newmiller <jdnewmil using dcn.davis.ca.us>
Tema: Re: [Rd] [R] Why Rprofile.site is not built with manual installation of R devel in linux?


On 10 November 2023 at 14:19, Martin Maechler wrote:
|     >> 2.  In the installed R in /where/you/want/R/to/go, there is no even etc folder, there are only the folders bin, lib and share.

That would appear to be an error in the locally installed R.

What the package does has been discussed before. Per the Linux Filesystem
Standard (or Filesystem Hierarchy or whatever it is called), Linux distro
such as Debian and Ubuntu use _both_ /usr/lib _and_ /usr/share so the
directories are split. Use the `R.home()` function to find them:

    $ Rscript -e 'sapply(c("bin", "doc", "etc"), R.home)'
                   bin                doc                etc
      "/usr/lib/R/bin" "/usr/share/R/doc"   "/usr/lib/R/etc"
    $

That is from the packaged R via r-base-core.

The behaviour can easily be validated by invoking, say, a Docker container
based on these same (Debian) packages. One of the containers I look after in
the Rocker Project has also been aliased to just 'r-base' for years by Docker
itself so just prefix the above by 'docker run --rm -ti r-base' to run in a
clean container:

    $ docker run --rm -ti r-base Rscript -e 'sapply(c("bin", "doc", "etc"), R.home)'
                   bin                doc                etc
      "/usr/lib/R/bin" "/usr/share/R/doc"   "/usr/lib/R/etc"
    $

Being able to run Docker for such tests is a good superpower and on most
systems these days only one package installation away.

For a locally built one (my r-devel build here) it works the same but points
of course to a different directory:

    $ RDscript -e 'sapply(c("bin", "doc", "etc"), R.home)'
                                   bin                                doc
    "/usr/local/lib/R-devel/lib/R/bin" "/usr/local/lib/R-devel/lib/R/doc"
                                   etc
    "/usr/local/lib/R-devel/lib/R/etc"
    $

As suggested, question for 'R on Debian, Ubuntu, ...' should probably go to
r-sig-debian which is now CCed.  As usual, you must be subscribed to post or
else you will get mistaken for a spammer and ignored.

Dirk

--
dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org

	[[alternative HTML version deleted]]



More information about the R-devel mailing list