4/23/2019 Updating R and RStudio
Updating R and RStudio
Nick Hathaway; [Link]@[Link]
([Link]
Updating R
Updating on Windows
Updating On Mac and Ubuntu
Updating RStudio
Updating R Packages
Updating Out of date Packages
Updating all Packages after R update
Updating R
Updating on Windows
Updating on Windows is apparently tricky, a package called installr , which is only for
Windows can be used to ease the process.
The following commands were taken from here ([Link]
r-from-r-on-windows-using-the-installr-package/), which goes into more details.
First Install the installr package if you don’t have it
# installing/loading the package:
if(!require(installr)) {
[Link]("installr");
require(installr)
} #load / install+load installr
Now call updateR() function to call update
This will start the updating process of your R installation. It will check for newer versions, and if
one is available, will guide you through the decisions you’d need to make.
# using the package:
updateR()
Updating On Mac and Ubuntu
One Mac and Ubuntu you need to go to the CRAN ([Link] website,
[Link] ([Link] to install the newer package intaller.
Updating RStudio
Updating RStudio is easy, just go to Help > Check for Updates to install newer version.
[Link] 1/2
4/23/2019 Updating R and RStudio
Updating R Packages
Updating Out of date Packages
Updating out of date package that were installed with [Link]() is easy with the
[Link]() function.
[Link]()
Which will ask you for every package if you want to update, to just say yes to everything use
ask = FAlSE .
[Link](ask = FALSE)
Unfortunately this won’t update packages installed by devtools::install_github()
Updating all Packages after R update
On Windows this is hanlded by the package installr . But for other operating systems, after
updating R, a lot of packages might have been build under the old R version and it would be safer
to re-install all the packages already installed. This can be done with the following commands.
Again this won’t update packages installed with devtools::install_github()
## get packages installed
packs = [Link]([Link](.libPaths()[1]), stringsAsFactors = F)
## and now re-install install packages using [Link]()
[Link](packs$Package)
[Link] 2/2