Skip to content
Prev 2545 / 15076 Next

Setting environment variables, especially http_proxy and ftp_proxy

On Wed, 5 Apr 2006, Kasper Daniel Hansen wrote:

            
The only problem I had with using .Renviron was that the
setting for R_LIBS (which I set in that file) was not
available to the command line invocations for running
check and INSTALL.

But even that is easily fixed as the format of .Renviron
is the same as that of POSIX shell .profile. So in your
.profile, import the desired portion of the R environment
to your shell as well. This solution works on Mac OS X as
well as any Un*x-based setup.



--------------------- .Renviron --------------------------
###
### .Renviron - R environment variables
###

R_LIBS=~/Library/R/library
R_NO_UNDERLINE=1
R_PAPERSIZE=letter
STRICT_R_HEADERS=1


--------------------- .profile ---------------------------
###
### .profile - POSIX shell personal initialization
###

... whatever initialization code exists ...

##
## Setup R
##
export $( grep R_LIBS .Renviron )

----------------------------------------------------------
SIGSIG -- signature too long (core dumped)