Package 'updater'

Title: Utilities for Updating R
Description: When updating major or minor R versions all packages should be re-installed. The utilities in this package assist in getting a user up-and-running again by installing all previously installed R packages. The package uses 'renv' to install; immediately replenishing your 'renv' package cache.
Authors: Daniel D. Sjoberg [aut, cre, cph]
Maintainer: Daniel D. Sjoberg <[email protected]>
License: MIT + file LICENSE
Version: 0.1.2
Built: 2024-10-16 03:00:40 UTC
Source: https://github.com/ddsjoberg/updater

Help Index


Find Package Library

Description

The function searches the system paths to find the location of the previous R version's system library location. It is not recommended to use this function! Rather, we recommend that a user simply opens the previous version of R and runs .libPaths() to find the library location(s).

Usage

find_previous_library_location()

Value

package library location

Examples

find_previous_library_location()

Re-install Packages from Previous Installation

Description

Provided the location of the previous R installation's package library, the function will attempt to re-install each of the packages found. Packages are installed with renv::install() and will be added to the 'renv' package cache.

Packages can be installed from GitHub, GitLab, BioConductor, and any repository listed in getOption("repos"). This would typically be from CRAN and any other secondary repositories that may be set.

Usage

install_pkgs(lib.loc = NULL)

Arguments

lib.loc

character vector describing the location of R library trees to search through

Examples

if (interactive()) {
  install_pkgs()
}

R Versions

Description

These functions return the current R version and the the previously installed R version. The format of the returned version matches the default folder name where R is installed.

Usage

r_version()

previous_r_version()

Value

string of R version

Examples

r_version()

previous_r_version()