我有以下问题。 Windows10设置了漫游配置文件。 R无法在漫游主目录上写入(原因不明)。 安装库时,出现以下错误:
Error in install.packages : path[1]="\\me-winserver\home$\xxx\Documents\R\win-library\3.5": Access is denied
通常,我通过为R_LIBS_USER设置环境变量来解决这个问题,并且这个新路径确实显示在libPaths中。然而,它将被添加到旧路径,这让我感到惊讶:
> .libPaths()
[1] "\\\\me-winserver/home$/xxx/Documents/R/win-library/3.5"
[2] "C:/Program Files/R/R-3.5.0/library"
现在,R仍尝试将所有内容安装到第一个路径中。如何删除此条目或更改其序列?
file.path(Sys.getenv("HOME"), ".Rprofile")
"//me-winserver/home$/xxx/Documents/.Rprofile"
sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.5.0 tools_3.5.0