简体   繁体   English

只需将带有包的文件夹粘贴到 R-3.6.1\library 位置即可安装 R 库

[英]Installing R libraries by simply pasting the folders with packages to R-3.6.1\library location

I know there are plenty of ways to install packages but I obtained a zipped folder containing lots of folders with r packages.我知道有很多方法可以安装软件包,但我获得了一个压缩文件夹,其中包含许多带有 r 软件包的文件夹。 Is that ok to simply unzip the folder, copy all the folders and paste them to R-3.6.1\library location?可以简单地解压缩文件夹,复制所有文件夹并将它们粘贴到 R-3.6.1\library 位置吗? Will that work properly?这会正常工作吗?

You're talking about the installed package folders that were built and installed on another computer?您说的是在另一台计算机上构建和安装的已安装 package 文件夹吗?

You'd want to be sure they are from the same operating system and version of R.您需要确保它们来自相同的操作系统和版本的 R。

It also depends if there are any unmet or potentially conflicting dependencies.它还取决于是否存在任何未满足或潜在冲突的依赖关系。 If not, in theory it should work.如果没有,理论上它应该可以工作。

But you'll then get notified of package updates.但是您会收到有关 package 更新的通知。 So it will only save you time installing them in the first place.因此,它只会节省您首先安装它们的时间。

You could always switch between the package libs location when starting RStudio, by setting the " R_LIBS_USER " environment variable.在启动 RStudio 时,您始终可以通过设置“ R_LIBS_USER ”环境变量在 package 库位置之间切换。 Then update those packages (and get a sense of how safe it is), and you'll probably run into less chance of issues when you soft-copy them across to your primary location.然后更新这些软件包(并了解它的安全性),当您将它们软复制到您的主要位置时,您可能会遇到更少的问题。

And please backup the primary location first if you need to restore it to that point.如果您需要将其还原到该点,请先备份主要位置。

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

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