From |@go@g|ne @end|ng |rom @jd@e@  Fri Nov 10 17:06:02 2023
From: |@go@g|ne @end|ng |rom @jd@e@ (=?iso-8859-1?Q?Iago_Gin=E9_V=E1zquez?=)
Date: Fri, 10 Nov 2023 16:06:02 +0000
Subject: [Rd] 
 [R] Why Rprofile.site is not built with manual installation of
 R devel in linux?
In-Reply-To: <25934.13053.707608.395510@rob.eddelbuettel.com>
References: <AM6PR02MB44230F37BC7E7A139581925F94AFA@AM6PR02MB4423.eurprd02.prod.outlook.com>
 <205A4E17-50C5-45F0-8D91-F400C1B89E6E@dcn.davis.ca.us>
 <25934.11765.552272.1395@stat.math.ethz.ch>
 <25934.13053.707608.395510@rob.eddelbuettel.com>
Message-ID: <AM6PR02MB44230EDF08B28923C2D45E5A94AEA@AM6PR02MB4423.eurprd02.prod.outlook.com>

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 at debian.org>
Enviat el: divendres, 10 de novembre de 2023 14:41
Per a: Martin Maechler <maechler at stat.math.ethz.ch>
A/c: Iago Gin? V?zquez <iago.gine at sjd.es>; R-SIG-debian at r-project.org <R-SIG-debian at r-project.org>; r-devel at r-project.org <r-devel at r-project.org>; Jeff Newmiller <jdnewmil at 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 at debian.org

	[[alternative HTML version deleted]]



[Rd] [R] Why Rprofile.site is not built with manual installation of R devel in linux?
=?iso-8859-1?Q?Iago_Gin=E9_V=E1zquez?=