简体   繁体   中英

Installing R and RStudio Packages (knitr, ggplot2, partykit, ROCR, randomForest, shiny)

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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