R端子:
您可以传递指定库位置的lib
参数。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()’.
工作室:
如果您转到工具 -> 安装包,您可以在对话框中指定安装包的位置。