Skip to contents

Catch any error raised by devtools::install_dev_deps and return it as string

Usage

installDepsWithErrCatching(
  doUpgrades = TRUE,
  instDevDeps = 1,
  repo = "https://cloud.r-project.org"
)

Arguments

doUpgrades

TRUE to pass "always" to sub-function, this force upgrade of dependencies. FALSE to pass "never" to sub-function, dependencies will never be upgraded.

instDevDeps

1 (default) to install also development dependencies ("Suggests") other values to install only "Depends", "Imports" and "LinkingTo"

repo

The repository used to download packages

Value

A list with: - errorOccurs: a boolean at TRUE if an error is caught - condition: a condition object related to the error caught (or NULL if no error caught)

Examples

if (FALSE) {
    citoolsr:::installDepsWithErrCatching(doUpgrades = TRUE)
}