isAvailable: Is a required package available?

View source: R/utils.R

isAvailableR Documentation

Is a required package available?

Description

Convenience function for checking and installing required packages.

Usage

isAvailable(pkg, type = c("annotation", "software", "data"))

Arguments

pkg

Character vector of length 1. A valid name of an existing R package.

type

Character vector of length 1. What type of package is this? Choose one out of 'annotation', 'software', or 'data' package.

Details

Checks whether a required package is available in the library. If yes, the package is loaded via requireNamespace. If not, the package is optionally installed via install and, subsequently, loaded via requireNamespace.

Value

None. See details.

Author(s)

Ludwig Geistlinger <Ludwig.Geistlinger@sph.cuny.edu>

See Also

require, install

Examples


    
        isAvailable("EnrichmentBrowser", type="software")
         


lgeistlinger/EnrichmentBrowser documentation built on May 9, 2024, 7:22 p.m.