Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Linux 上升级 R 时会删除软件包吗?我宁愿只使用默认的包安装目录,而不是设置自定义目录。
我知道我可以通过以下方式设置自定义目录:
cat >> ~/.Renviron R_LIBS=/data/Rpackages/
我只是想知道如果我不发出上面的命令会发生什么?每次我发出命令时都会擦除包吗
sudo apt-get update && sudo apt-get upgrade
,因此 R 会更新到最新版本?
@Jason,当您这样做时sudo apt-get update && sudo apt-get upgrade,它只会升级在您的存储库列表中具有新版本的软件包。它没有理由修改已安装的 R 包。
我也在运行 Linux 和 R,我唯一需要重新安装 R 包的时候是重新安装我的系统。我的 R 包默认安装在/usr/local/lib/R/site-library
/usr/local/lib/R/site-library