0

What would be the easiest command / method for installing the following packages for R and RStudio : knitr (everything to support the .rmd), dplyr, ggplot2, partykit, ROCR, randomForest, shiny?

I am relatively new to coding and have never used R software. There are 15 laptops that I need to log into and install all the packages above on (they already have R and RStudio installed).

Looking for the easiest way to install all the packages in one go on each computer, be it using command prompt or R. Any advice / code would be much appreciated! The laptops are connected to the internet.

DEB
  • 241
  • 1
  • 2
  • 7
  • See [this](https://stackoverflow.com/questions/8175912/load-multiple-packages-at-once) – DanY Sep 18 '18 at 20:14
  • `install.packages(c("knitr", "dplyr", "ggplot2", "partykit", "ROCR", "randomForest", "shiny"), dependencies = T)` – sm925 Sep 18 '18 at 20:22

1 Answers1

0

Typically you would just run

install.packages(c("knitr", "dplyr", "ggplot2", "partykit", "ROCR", "randomForest", "shiny"))

in R on each computer. But what that does is copy these packages into a local library folder. That path is determined by .libPaths(). You could just copy the contents of that folder into the library folders of the other computers. Things can get tricky with user permissions though depending on what OS you are running.

MrFlick
  • 195,160
  • 17
  • 277
  • 295