简体   繁体   English

如何设置已安装的R软件包的库位置

[英]How to set the library location of installed R packages

My issue is that the package path I installed in R terminal is different from where I installed in R-studio. 我的问题是,我在R终端中安装的软件包路径与在R-studio中安装的软件包路径不同。 So I'd like to change the install location. 因此,我想更改安装位置。 How can I do that ? 我怎样才能做到这一点 ? Thanks 谢谢

R terminal: R端子:

You can pass the lib argument to install.packages which specifies the library location. 您可以将lib参数传递给install.packages ,以指定库的位置。 See ?install.packages : 请参阅?install.packages

 lib: character vector giving the library directories where to
      install the packages.  Recycled as needed.  If missing,
      defaults to the first element of ‘.libPaths()’.

Rstudio: Rstudio:

If you go to tools -> Install Packages, you can specify where to install your package in the dialog. 如果转到工具->安装软件包,则可以在对话框中指定安装软件包的位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM