Skip to contents

This function checks for needed packages

Usage

needsPackages(pkgs, install = TRUE, 
                    update = FALSE, 
                    load = FALSE, 
                    attach = FALSE)

Arguments

pkgs

A list of names of packages to check.

install

Whether to install missing packages.

update

Whether to update all packages that can be updated.

load

Whether to load namespaces for packages.

attach

Whether to run library calls.

Details

Each of the boolean arguments can be a vector of the same length as pkgs, applying separately to each entry.

Value

Called for the side effects.

Examples

# This shouldn't do anything, as patchDVI must already be
# installed!
needsPackages("patchDVI")