简体   繁体   English

快速安装R软件包

[英]Install R packages on the fly

Whenever I want to run a complex application in R that needs many packages and libraries, I have to install one by one all the dependencies and then re run again to see the next dependency. 每当我想在R中运行需要许多软件包和库的复杂应用程序时,都必须一个一个地安装所有依赖项,然后再次运行以查看下一个依赖项。 I am having the same problem with running a shinydashboard app. 我在运行shinydashboard应用程序时遇到相同的问题。 I wonder if there is a way the first time I am about to execute an R script, at the same time to install on the fly all the dependencies this script needs. 我想知道是否有一种方法可以让我第一次执行R脚本,同时动态安装该脚本需要的所有依赖项。 I am running an R server on windows. 我在Windows上运行R服务器。 Thanks! 谢谢!

Perhaps you want to use pacman 也许您想使用pacman

library(pacman)
p_load(dplyr, reshape2) # install if needed, then load

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

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