[Rd] Windows 7 and .libPaths()

Rui Barradas ruipbarradas at sapo.pt
Mon Aug 6 12:09:53 CEST 2012


Hello,

I'm having some trouble trying to set the .libPaths() on Windows 7, 
R-2.15.0 and R-2.15.1. The environment variables R_LIBS and R_LIBS_USER 
are set according to the help page for .libPaths() and the Rprofile.site 
file has the default setting, as shown below. R-2.14.1 recognizes the 
lib paths but not R-2.15. Is this a bug or am I doing something wrong?
(I've also tried with R-2.12.0 and R-2.13.0 and it works as documented 
but I only show here the output for R-2.14.1, R-2.15.0 and R-2.15.1)

First, the Windows settings.

Microsoft Windows [Versão 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Todos os direitos reservados.

C:\Users\Rui>echo %R_LIBS%
C:/PROGRA~1/R/win-library;

C:\Users\Rui>echo %R_LIBS_USER%
C:/PROGRA~1/R/win-library;C:/PROGRA~1/R/win-library/%v;

Then, file Rprofile.site .

# set libPath to win-library
.libPaths(new="C:PROGRA~1/R/win-library")
.libPaths(new=paste("C:PROGRA~1/R/win-library", 
paste(R.version$major,as.integer(R.version$minor),sep='.'), sep="/"))

Finally, three R sessions.

#--------- R-2.14.1

 > .libPaths()
[1] "C:/Program Files/R/win-library"      "C:/Program 
Files/R/win-library/2.14"
[3] "C:/Program Files/R/R-2.14.1/library"
 >
 > sessionInfo()
R version 2.14.1 (2011-12-22)
Platform: i386-pc-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=Portuguese_Portugal.1252 LC_CTYPE=Portuguese_Portugal.1252
[3] LC_MONETARY=Portuguese_Portugal.1252 LC_NUMERIC=C
[5] LC_TIME=Portuguese_Portugal.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

#--------- R-2.15.0

 > .libPaths()
[1] "C:/Program Files/R/R-2.15.0/library"
 >
 > sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: i386-pc-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=Portuguese_Portugal.1252 LC_CTYPE=Portuguese_Portugal.1252
[3] LC_MONETARY=Portuguese_Portugal.1252 LC_NUMERIC=C
[5] LC_TIME=Portuguese_Portugal.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

#--------- R-2.15.1

 > .libPaths()
[1] "C:/Program Files/R/R-2.15.1/library"
 >
 > sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: i386-pc-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=Portuguese_Portugal.1252 LC_CTYPE=Portuguese_Portugal.1252
[3] LC_MONETARY=Portuguese_Portugal.1252 LC_NUMERIC=C
[5] LC_TIME=Portuguese_Portugal.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods base

loaded via a namespace (and not attached):
[1] fortunes_1.5-0


Rui Barradas



More information about the R-devel mailing list