package: Package management utilities

lib_upgradeR Documentation

Package management utilities

Description

lib_upgrade() is a stopgap until pak::lib_upgrade() https://github.com/r-lib/pak/issues/168. There is no direct way to enforce binary for now: https://github.com/r-lib/pak/issues/318. pak::pkg_upgrade() is not available yet: https://github.com/r-lib/pak/pull/289. Versioned CRAN packages are not implemented yet https://github.com/r-lib/pkgdepends/blob/main/R/type-cran.R.

old_packages() is a thin wrapper of utils::old.packages().

install_packages() is a thin wrapper of pak::pkg_install() to temporarily force binary installation.

Usage

lib_upgrade(..., binary = TRUE, ask = interactive())

old_packages(..., binary = TRUE)

install_packages(pkg, lib = .libPaths()[[1L]], ..., binary = TRUE)

Arguments

...

Passed to utils::old.packages() or pak::pkg_install().

binary

A logical. Set FALSE to accept source packages.

ask

Whether to ask for confirmation when installing a different version of a package that is already installed. Installations that only add new packages never require confirmation.

pkg

Package names or package references. E.g.

  • ggplot2: package from CRAN, Bioconductor or a CRAN-like repository in general,

  • tidyverse/ggplot2: package from GitHub,

  • tidyverse/ggplot2@v3.4.0: package from GitHub tag or branch,

  • ⁠https://examples.com/.../ggplot2_3.3.6.tar.gz⁠: package from URL,

  • .: package in the current working directory.

See "Package sources" for more details.

lib

Package library to install the packages to. Note that all dependent packages will be installed here, even if they are already installed in another library. The only exceptions are base and recommended packages installed in .Library. These are not duplicated in lib, unless a newer version of a recommemded package is needed.


heavywatal/rwtl documentation built on June 13, 2025, 7:39 a.m.