How to do a silent install of R

In this post, I’ll introduce how to do a silent install of R. Assume that you are a faculty member at an R course and need to prepare R environments for each students’ PC. In this case, you can install R, RStudio and R package in just one-click by their silent install mode.

1. R silent installation
According to the R FAQ, the R installer has command line options for silent installation “/SILENT” and “/VERYSILENT“. Download the R installer and run the command “R-3.1.0-win.exe /SILENT” from your command prompt enables you to do silent install.


2. RStudio silent installation
RStudio also has silent installation option. This support page describes how to run as a silent mode. According to the page the Rstudio installer has silent option “/S” and the command “RStudio-0.98.507.exe /S” enables you to do a silent install.


3. R package silent installation
R packages such as ggplot2 or plyr are installable from the command line.

3-1. Download the R packages from CRAN site
Download packages and all required/dependent packages(s) mentioned in CRAN page.


3-2. Run a silent installation command
Below is an example of the command.

"%ProgramFiles%\R\R-3.1.0\bin\R" CMD INSTALL


4. Making a silent installation script
Create a silent installation script to enable one-click installation.

4-1. Download installers and R packages and store them into the same folder

4-2. Make a BAT file
Below is a code example, and save it as BAT file (ex: Rinstall.bat).

R-3.1.0-win.exe /SILENT
RStudio-0.98.507.exe /S
"%ProgramFiles%\R\R-3.1.0\bin\R" CMD INSTALL
"%ProgramFiles%\R\R-3.1.0\bin\R" CMD INSTALL


4-3. Run the BAT file as an administrator

These procedures are quite simple and also available when you are updating your R environment. Let’s try when you become an R lecturer.


Data Science and Software Engineering

Posted in R
3 comments on “How to do a silent install of R
  1. Tal Galili says:

    Hi Takekatsu ,
    This is very nice.
    Would you be willing to help and extend the installr package with this? (e.g. – adding it as an option with a relevant parameter and documentation)

    You would need to work on the “install.r” function, and also the updateR function. They are available to fork from here:

    Once done – I’d gladly review/approve/add-as-a-contributor to the package.


  2. Phil says:

    Is there an analogous procedure for Mac? My students are split between the two OS’s.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: