[R] Problem with .libPaths & Rterm.exe (under Vista)

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Oct 4 18:31:08 CEST 2007


On Thu, 4 Oct 2007, Wolfgang Raffelsberger wrote:

> Dear list,
>
> I?m using R embedded in another program (coded in tcl/tk) under Windows
> Vista. In this context I don?t launch Rgui.exe but rather Rtem.exe.
>
>
> Now I have a problem finding libraries not specifically installed as
> administrator (and which are not in the path ?program files? but in
> Contacts\Documents of the current user). To be precise, the user
> launching my tcl/tk program can?t find the libraries he previously
> installed locally (as Vista does by default when not launched
> specifically with administrator rights).
>
> However, when (manually) launching Rterm.exe directly (or R.exe) the
> command .libPaths() returns correctly 2 locations (the personal local
> library and the ?common? one in ?program files?) as it does with RGui.exe .
>
> Does anyone have an idea how or why I can?t see the location of the
> additional libraries ?

You mean the additional library what contains packages?  It really does 
help to get your terminology straight here.

What libraries are on .libPaths() is controlled by environment variables, 
so debugging those will be the key.  This is all explained on the help 
page for .libPaths.


> Could it be a problem with the attributes of : Rterm.exe --vanilla -q <
> myRcode.r

Yes, it could.  Look up what --vanilla does in ?Startup: it skips places 
where the environment variables are usually set.

>
> (Note that I had no difficulties with these attributes calling R under
> Win XP or Linux, but never faced the problem of multiple locations for
> libraries.)
>
>
> please find below the code form *(a)* launching : Rterm.exe ?vanilla ?q
> < myRcode.r (where ?local? libs are *NOT found*) :**
>
>>  .libPaths()
>
> "C://PROGRA~1/R/R-26~1.0/library"
>
>>  require(affy)
>
> Le chargement a nécessité le package : affy
>
> Warning messages:
>
> 1: In library(package, lib.loc = lib.loc, character.only = TRUE,
> logical.return = TRUE, :
>
> aucun package nommé 'affy' n'est trouvé
>
> > # this translates into "no package called "affy" was found"
>
>>  sessionInfo()
>
> R version 2.6.0 (2007-10-03)
>
> i386-pc-mingw32
>
> locale:
>
> LC_COLLATE=French_France.1252;LC_CTYPE=French_France.1252;LC_MONETARY=French_France.1252;LC_NUMERattached
> base packages:
>
> [1] stats graphics grDevices utils datasets methods base
>
>
>
>
> and the code from (b) manually launching : Rterm.exe (where ?local? libs
> are found OK) :
>
>>  .libPaths()
>
> [1] "C:\\Users\\wr\\Contacts\\Documents/R/win-library/2.6"
>
> [2] "C:/PROGRA~1/R/R-26~1.0/library"
>
>>
>
>> require(affy) # was NOT installed in : program files/...
>
> Le chargement a nécessité le package : affy
>
> Le chargement a nécessité le package : Biobase
>
> Le chargement a nécessité le package : tools
>
> Welcome to Bioconductor
>
> Vignettes contain introductory material. To view, type
>
> 'openVignette()'. To cite Bioconductor, see
>
> 'citation("Biobase")' and for packages 'citation(pkgname)'.
>
> Le chargement a nécessité le package : affyio
>
> Le chargement a nécessité le package : preprocessCore
>
>>
>
>>  sessionInfo()
>
> R version 2.6.0 (2007-10-03)
>
> i386-pc-mingw32
>
> locale:
>
> LC_COLLATE=French_France.1252;LC_CTYPE=French_France.1252;LC_MONETARY=French_France.1252;LC_NUMERIC=C;LC_TIME=French_France.1252
>
> attached base packages:
>
> [1] stats graphics grDevices utils datasets methods base
>
> As you can see only a single path is found, which is the default
> collection of libraries in the path of the R installation itself.
>
> Does anyone have an idea how I could identify the libPath for a given
> user and by which argument added to R.exe I could allow accessing these
> libraries, too ?
>
> Thanks? in advance,
> Wolfgang Raffelsberger
>
>
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> . . .
>
> Wolfgang Raffelsberger, PhD
> Laboratoire de BioInformatique et Génomique Intégratives
> IGBMC
> 1 rue Laurent Fries, 67404 Illkirch Strasbourg, France
> Tel (+33) 388 65 3300 Fax (+33) 388 65 3276
> wolfgang.raffelsberger at igbmc.u-strasbg.fr
>
> ______________________________________________
> 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