[R] Help trying to understand R documentation on libraries paths
Iago Giné Vázquez
|@go@g|ne @end|ng |rom @jd@e@
Mon Jun 17 09:51:27 CEST 2024
Hi,
1 - On help(".libPaths", help_type = "text") one can read:
First, '.Library.site' is initialized from 'R_LIBS_SITE'.
However, I have
> Sys.getenv("R_LIBS_SITE")
[1] "c:/Users/i.gine/AppData/Local/Programs/R/R-4.4.1/site-library"
> .Library.site
character(0)
Is this consistent?
2 - Next, on the same help document, one can read:
Then, '.libPaths()' is called with the combination
of the directories given by 'R_LIBS' and 'R_LIBS_USER'.
This time, I get
> Sys.getenv("R_LIBS")
[1] ""
> Sys.getenv("R_LIBS_USER")
[1] "c:/Users/i.gine/AppData/Local/Programs/R/R-4.4.0/library"
> .libPaths()
[1] "C:/Users/i.gine/AppData/Local/Programs/R/R-4.4.0/library" "C:/Users/i.gine/AppData/Local/Programs/R/R-4.4.1/library"
Later is written:
Function '.libPaths' always uses the values of '.Library' and
'.Library.site' in the base namespace.
and indeed
> .Library
[1] "c:/Users/i.gine/AppData/Local/Programs/R/R-4.4.1/library"
Then, shouldn't be this specified above together with "directories given by 'R_LIBS' and 'R_LIBS_USER'"?
Am I understanding it wrongly? Otherwise, what do you think on the current way this help page is explained?
Thank you for your help and time.
Best regards,
Iago
[[alternative HTML version deleted]]
More information about the R-help
mailing list