Hi everyone,
Two minor points about ?.Renviron.
1) If R_ENVIRON is not set then R defaults to `${R_HOME}/etc/Renviron',
not `${R_HOME}/etc/Renviron.site' as stated.
2) In the details, there is a missing "way" in "`value' is processed
in a similar to a Unix shell."
Cheers, Jonathan.
--please do not edit the information below--
Version:
platform = i686-pc-linux-gnu
arch = i686
os = linux-gnu
system = i686, linux-gnu
status =
major = 1
minor = 6.0
year = 2002
month = 10
day = 01
language = R
Search Path:
.GlobalEnv, Autoloads, package:base
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Documentation for .Renviron (PR#2175)
4 messages · j.c.rougier@durham.ac.uk, Brian Ripley, Jonathan Rougier
On Wed, 16 Oct 2002 j.c.rougier@durham.ac.uk wrote:
Hi everyone,
Two minor points about ?.Renviron.
1) If R_ENVIRON is not set then R defaults to `${R_HOME}/etc/Renviron',
not `${R_HOME}/etc/Renviron.site' as stated.
No, it does as it states. See the code fragment
/* try site Renviron: R_ENVIRON, then R_HOME/etc/Renviron.site. */
void process_site_Renviron ()
{
char buf[PATH_MAX];
if(process_Renviron(getenv("R_ENVIRON"))) return;
if(strlen(R_Home) + strlen("/etc/Renviron.site") > PATH_MAX - 1) {
R_ShowMessage("path to Renviron.site is too long: skipping");
return;
}
sprintf(buf, "%s/etc/Renviron.site", R_Home);
process_Renviron(buf);
}
in unix/sys-common.c.
The description is inaccurate though: R_HOME/etc/Renviron.site is read
unless R_ENVIRON is set to a valid file. I've altered the code so that
even if R_ENVIRON is invalid R_HOME/etc/Renviron.site is skipped.
${R_HOME}/etc/Renviron is for R's own use. It gets read whether or not
R_ENVIRON is set.
2) In the details, there is a missing "way" in "`value' is processed in a similar to a Unix shell."
Thanks.
Cheers, Jonathan. --please do not edit the information below-- Version: platform = i686-pc-linux-gnu arch = i686 os = linux-gnu system = i686, linux-gnu status = major = 1 minor = 6.0 year = 2002 month = 10 day = 01 language = R Search Path: .GlobalEnv, Autoloads, package:base -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
ripley@stats.ox.ac.uk wrote:
On Wed, 16 Oct 2002 j.c.rougier@durham.ac.uk wrote:
Hi everyone,
Two minor points about ?.Renviron.
1) If R_ENVIRON is not set then R defaults to `${R_HOME}/etc/Renviron',
not `${R_HOME}/etc/Renviron.site' as stated.
No, it does as it states. See the code fragment
/* try site Renviron: R_ENVIRON, then R_HOME/etc/Renviron.site. */
void process_site_Renviron ()
{
char buf[PATH_MAX];
if(process_Renviron(getenv("R_ENVIRON"))) return;
if(strlen(R_Home) + strlen("/etc/Renviron.site") > PATH_MAX - 1) {
R_ShowMessage("path to Renviron.site is too long: skipping");
return;
}
sprintf(buf, "%s/etc/Renviron.site", R_Home);
process_Renviron(buf);
}
in unix/sys-common.c.
The description is inaccurate though: R_HOME/etc/Renviron.site is read
unless R_ENVIRON is set to a valid file. I've altered the code so that
even if R_ENVIRON is invalid R_HOME/etc/Renviron.site is skipped.
${R_HOME}/etc/Renviron is for R's own use. It gets read whether or not
R_ENVIRON is set.
Perhaps that could be documented as well. I drew my inference from observing that if I did not have a "Renviron.site", then modifications to "Renviron", which has the same syntax as "Renviron.site", showed up in R. Jonathan.
Jonathan Rougier Science Laboratories Department of Mathematical Sciences South Road University of Durham Durham DH1 3LE tel: +44 (0)191 374 2361, fax: +44 (0)191 374 7388 http://www.maths.dur.ac.uk/stats/people/jcr/jcr.html -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Fri, 18 Oct 2002, Jonathan Rougier wrote:
ripley@stats.ox.ac.uk wrote:
On Wed, 16 Oct 2002 j.c.rougier@durham.ac.uk wrote:
Hi everyone,
Two minor points about ?.Renviron.
1) If R_ENVIRON is not set then R defaults to `${R_HOME}/etc/Renviron',
not `${R_HOME}/etc/Renviron.site' as stated.
No, it does as it states. See the code fragment
/* try site Renviron: R_ENVIRON, then R_HOME/etc/Renviron.site. */
void process_site_Renviron ()
{
char buf[PATH_MAX];
if(process_Renviron(getenv("R_ENVIRON"))) return;
if(strlen(R_Home) + strlen("/etc/Renviron.site") > PATH_MAX - 1) {
R_ShowMessage("path to Renviron.site is too long: skipping");
return;
}
sprintf(buf, "%s/etc/Renviron.site", R_Home);
process_Renviron(buf);
}
in unix/sys-common.c.
The description is inaccurate though: R_HOME/etc/Renviron.site is read
unless R_ENVIRON is set to a valid file. I've altered the code so that
even if R_ENVIRON is invalid R_HOME/etc/Renviron.site is skipped.
${R_HOME}/etc/Renviron is for R's own use. It gets read whether or not
R_ENVIRON is set.
Perhaps that could be documented as well. I drew my inference from observing that if I did not have a "Renviron.site", then modifications to "Renviron", which has the same syntax as "Renviron.site", showed up in R.
It is already documented in R-patched, with the comment that this is only so for Unix-alikes. Where did you get the idea that it was safe for you to tinker with etc/Renviron, though? Because etc/Renviron is used elsewhere (in the shell scripts), it is not safe to change.
Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._