我的个人库在~/.Renviron中设置为R_LIBS=~/.R/lib。当我从rstudio安装包时,它工作得很好。当我尝试从一个普通的R控制台会话安装新的软件包时,它总是问我:
Would you like to use a personal library instead? (y/n) y
Would you like to create a personal library
~/R/x86_64-redhat-linux-gnu-library/3.1
to install packages into? (y/n) n
当我从控制台会话进行更新时,~/.R/lib (以前从rstudio安装)中的现有包都会顺利更新。如果/usr中有全局包也需要更新,R会再次询问我是否要创建~/R/x8664-redhat-linux-gnu-library/3.1。
我已经尝试了许多配置,但没有找到解决这个问题的方法。
专业小费?
发布于 2015-04-30 22:49:29
是的,我总是在我使用的系统上取消它,我甚至试着把它放在我维护的Debian包之外。在Debian中,我们使用
/usr/lib/R/library for core R packages shipping with R
/usr/lib/R/site-library for r-cran-* packages from the distro
/usr/local/lib/R/site-library for what the user installs from CRAN
使用适当的顺序:
R> .libPaths()
[1] "/usr/local/lib/R/site-library" "/usr/lib/R/site-library" \
"/usr/lib/R/library"
R>
我要做的就是把这个注释掉
#R_LIBS_USER=${R_LIBS_USER-'~/R/x86_64-pc-linux-gnu-library/3.1'}
#R_LIBS_USER=${R_LIBS_USER-'~/Library/R/3.1/library'}
# edd Apr 2003 Allow local install in /usr/local, also add a directory for
# Debian packaged CRAN packages, and finally the default dir
# edd Jul 2007 Now use R_LIBS_SITE, not R_LIBS
R_LIBS_SITE=${R_LIBS_SITE-'/usr/local/lib/R/site-library:\
/usr/lib/R/site-library:/usr/lib/R/library'}
我想我必须在Debian包中更新我的补丁...
https://stackoverflow.com/questions/29969838
复制相似问题