[R] .Renviron for multiple hardwares...
Prof Brian Ripley
ripley at stats.ox.ac.uk
Mon Jan 26 07:35:08 CET 2009
On Sun, 25 Jan 2009, Jonathan Greenberg wrote:
> Ah, perfect -- so would the "ideal" R_LIBS_USER setting (to more or less
> guarantee the libraries will work on every possible computer) be something
> along the lines of:
>
> ~/myRlibraries/%V%p%o%a
>
> Or is this overkill?
%V is overkill. On some OSes %v is needed (Mac OS, WIndows) and on
others you can get away without it. And %p includes %o and %a. The
default is on a Unix-alike
~/R/%p-library//%v
>
> --j
>
> Prof Brian Ripley wrote:
>> On Sun, 25 Jan 2009, Henrik Bengtsson wrote:
>>
>>> The script .Rprofile evaluates R code on startup. You could use that
>>> to test for various environment variables. Alternatively, use Unix
>>> shell scripts to set system environment variables to be used in a
>>> generic .Renviron. See help(Startup) for more details.
>>
>> Well, not just 'Unix shell scripts', just R_ENVIRON_USER apppriately (on
>> any OS).
>>
>>>
>>> /Henrik
>>>
>>> On Sun, Jan 25, 2009 at 11:22 AM, Jonathan Greenberg
>>> <greenberg at ucdavis.edu> wrote:
>>>> Our lab has a lot of different unix boxes, with different hardware, and
>>>> I'm
>>>> assuming (perhaps wrongly) that by setting a per-user package
>>>> installation
>>>> directory, the packages will only work on one type of hardware. Our
>>>> systems
>>>> are all set up to share the same home directory (and, thus, the same
>>>> .Renviron file) -- so, is there a way to set, in the .Renviron file,
>>>> per-computer or per-hardware settings? The idea is to have a different
>>>> package installation directory for each computer (e.g.
>>>> "~/R/computer1/packages" and "~/R/computer2/packages".
>>
>> Well, we anticipated that and the default personal directory is
>> set by R_LIBS_USER, and that has a platform-specific default. See
>> ?.libPaths.
>>
>> None of this is uncommon: my dept home file system is shared by x86_64
>> Linux, i386 Linus, x86_64 Solaris, Sparc Solaris, Mac OS X and Windows. I
>> just let install.packages() create a personal library for me on each one I
>> use it on.
>>
>>>> Thoughts? Ideas? Thanks!
>>>>
>>>> --j
>>>>
>>>> --
>>>>
>>>> Jonathan A. Greenberg, PhD
>>>> Postdoctoral Scholar
>>>> Center for Spatial Technologies and Remote Sensing (CSTARS)
>>>> University of California, Davis
>>>> One Shields Avenue
>>>> The Barn, Room 250N
>>>> Davis, CA 95616
>>>> Cell: 415-794-5043
>>>> AIM: jgrn307, MSN: jgrn307 at hotmail.com, Gchat: jgrn307
>>>>
>>>> ______________________________________________
>>>> R-help at r-project.org mailing list
>>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>>> PLEASE do read the posting guide
>>>> http://www.R-project.org/posting-guide.html
>>>> and provide commented, minimal, self-contained, reproducible code.
>>>>
>>>
>>> ______________________________________________
>>> R-help at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide
>>> http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>>
>
> --
>
> Jonathan A. Greenberg, PhD
> Postdoctoral Scholar
> Center for Spatial Technologies and Remote Sensing (CSTARS)
> University of California, Davis
> One Shields Avenue
> The Barn, Room 250N
> Davis, CA 95616
> Cell: 415-794-5043
> AIM: jgrn307, MSN: jgrn307 at hotmail.com, Gchat: jgrn307
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Brian D. Ripley, ripley at 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 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list