use_NVIverse: Attach and if necessary install packages within 'NVIverse'

View source: R/use_NVIverse.R

use_NVIverseR Documentation

Attach and if necessary install packages within NVIverse

Description

First, use_NVIverse checks if the package is installed. If not already installed, the package will be installed. Thereafter, the package is attached using library.

Usage

use_NVIverse(
  pkg,
  auth_token = NULL,
  dependencies = NA,
  upgrade = FALSE,
  build = TRUE,
  build_manual = FALSE,
  build_vignettes = TRUE,
  ...
)

Arguments

pkg

[character]
Name of one or more NVIverse packages.

auth_token

[character]
To install NVIconfig a personal access token is needed. Generate a personal access token (PAT) in "https://github.com/settings/tokens" and supply to this argument. Defaults to NULL.

dependencies

[logical(1) | character]
The dependencies to check and eventually install. Can be a character vector (selecting from "Depends", "Imports", "LinkingTo", "Suggests", or "Enhances"), or a logical vector. TRUE is shorthand for c("Depends", "Imports", "LinkingTo", "Suggests"). FALSE is shorthand for no dependencies, i.e. just check this package, not its dependencies. NA is shorthand for c("Depends", "Imports", "LinkingTo") and is the default.

upgrade

[logical(1) | character(1)]
Should package dependencies be upgraded? One of c("ask", "always", "never"). TRUE and FALSE are also accepted and correspond to "always" and "never" respectively. Defaults to FALSE.

build

[logical(1)]
If TRUE build the package before installing. Defaults to TRUE.

build_manual

[logical(1)]
If FALSE, don't build PDF manual ('–no-manual'). Defaults to FALSE.

build_vignettes

[logical(1)]
If FALSE, don't build package vignettes ("–no-build-vignettes"). Defaults to TRUE, but is set to FALSE if necessary packages for building vignettes are not installed.

...

Other arguments to be passed to remotes::install_github.

Details

Only packages within the NVIverse can be installed.

Examples

use_NVIverse("NVIcheckmate")
use_NVIverse(pkg = c("NVIcheckmate", "NVIdb"))

NorwegianVeterinaryInstitute/NVIbatch documentation built on Dec. 15, 2024, 3:15 p.m.