Skip to content

Dear Internet Explorer user: Your browser is no longer supported

Please switch to a modern browser such as Microsoft Edge, Mozilla Firefox or Google Chrome to view this website's content.

Update R from within the console

A useful protocol for updating the R statistical package from within the R console window.

One of the chief limitations of the R statistical package is the difficulty experienced in applying updates on Windows machines. Thankfully a package called “InstallR” has been developed to enable a relatively seamless upgrade of versions.

Installing InstallR

If the InstallR package has not been previously installed, enter the following into the RGui:

if(!require(installr)) {install.packages("installr"); require(installr)}

Then enter:


A check will be performed to ascertain whether an upgrade is required:

An opportunity to view the “News” regarding the update will be offered. This is optional and will lead to a browser window pop-up if accepted.

An option to install the latest version of R will then be given:

The software is then downloaded from the CRAN server:

A language option is provided at set-up:

Once complete, the older version of R can be deleted from the hard drive (the new version will be installed in parallel).

If InstallR is already installed

If InstallR is already installed from within R and you wish to check for an update, enter the following command:



No comments have yet been submitted. Be the first!

Have Your Say

The following HTML is permitted:
<a href="" title=""> <b> <blockquote cite=""> <code> <em> <i> <q cite=""> <strike> <strong>

Comments will be published subject to the Editorial Policy.