prepare_install: Install Packages at Next Startup

Description Usage Arguments Details Value

View source: R/utils-package.R

Description

Register temporary code that will install packages at next session. The code will be automatically removed once executed.

Usage

1
2
3
4
5
6
7
8
prepare_install(
  packages,
  update_all = FALSE,
  restart = FALSE,
  repos = getOption("repos")
)

prepare_install2(packages, restart = FALSE, repos = getOption("repos"), ...)

Arguments

packages

characters, vector of package names

update_all

whether to update all installed packages before installation; default is false

restart

whether to restart session automatically

repos

repositories to search for packages

...

internal arguments

Details

prepare_install is soft-deprecated, use prepare_install2 instead.

Installing packages in R session could require restarts if a package to be updated has been loaded. Normally restarting R fixes the problem. However, under some circumstances, such as with a startup code in profile, restarting R might still fail the installation. prepare_install2 starts a new session with clean environments for installation.

Value

None


dipsaus documentation built on Sept. 6, 2021, 5:08 p.m.