Re: [R] getOption() versus Sys.getenv

2017-08-25 Thread Henrik Bengtsson
There's also the alternative to use both, e.g. by having a system environment variable set a corresponding R option, which then can be overridden using options(). For instance, the R option mc.cores, which is used by the parallel package, is set to the (integer) value of system environment

Re: [R] getOption() versus Sys.getenv

2017-08-25 Thread Duncan Murdoch
On 25/08/2017 1:19 PM, Sam Albers wrote: Hi there, I am trying to distinguish between getOption() and Sys.getenv(). My understanding is that these are both used to set values for variables. getOption is set something like this: option("var" = "A"). This can be placed in an .Rprofile or at the

[R] getOption() versus Sys.getenv

2017-08-25 Thread Sam Albers
Hi there, I am trying to distinguish between getOption() and Sys.getenv(). My understanding is that these are both used to set values for variables. getOption is set something like this: option("var" = "A"). This can be placed in an .Rprofile or at the top of script. They are called like this