4

When I start R it’s meant to read from /etc/Rprofile.site first thing. I’ve verified that this isn’t happening but have no idea why or how to fix it. When I source('/etc/Rprofile.site') at startup everything goes fine.


Some random things I thought to investigate, which may be useful for someone who wants to help or may be irrelevant…

$ which R
/usr/bin/R

$ ls -l /usr/bin/R
-rwxr-xr-x 1 root root 8589 … /usr/bin/R

(nothing fishy hiding in a pointer/softlink so that’s not it)

$ echo $R_HOME

$ less ~/.Renviron
/home/isomorphismes/.Renviron: No such file or directory

> Sys.getenv("R_HOME")
[1] "/usr/lib/R"

> Sys.getenv("RHOME")
[1] "~/R/i686-pc-linux-gnu-library/"

1 Answers1

2

You should try to see what R thinks its R_HOME (or RHOME) is. Try to run

R RHOME

that should print the value of RHOME and exit.

Alternatively, from the R command line

Sys.getenv("R_HOME")

I think R will read the startup and conf files from $(R RHOME)/etc/

Maybe it's not the location you think it is... Hope this helps

Regards