An Introduction to R and RStudio

Updating Packages

There are several ways that this may be achieved:

  1. Auto-update in RStudio This is the easiest way to update and maintain your packages. A package update option has been included since version 94.XX, just go to the packages tab and select search for updates. This will open a window and display which (if any) packages have newer versions available. This works for both CRAN and Bioconductor packages.fn5

  2. Via console Bioconductor packages, especially those in the development branch, are updated fairly regularly. To identify packages requiring update, start a new session of R and enter:

    # bioconductor
    source("http://bioconductor.org/biocLite.R")
    old.packages(repos = biocinstallRepos())
    # CRAN packages
    old.packages()
    

To update all installed packages that are out of date enter:

# bioconductor
update.packages(repos = biocinstallRepos(), ask = FALSE, checkBuilt = TRUE)
# CRAN packages
update.packages()

fn5. This ability appears to change between RStudio releases. As of the current release (0.96.331) it is working.