Register temporary code that will install packages at next session. The code will be automatically removed once executed.
prepare_install2(packages, restart = FALSE, repos = getOption("repos"), ...)
None
characters, vector of package names installation; default is false
whether to restart session automatically
repositories to search for packages
internal arguments
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.