Learn R Programming

Xmisc (version 0.2.1)

is.package.loaded: Check if a package is loaded

Description

Check if a package is loaded

Usage

is.package.loaded(x, envir = sys.frame(sys.parent(0)), character.only = FALSE)

Arguments

x
package, see library or require.
envir
the environment to use.
character.only
see library or require.

Value

logical

See Also

check.packages

Examples

Run this code
is.package.loaded(Xmisc)
is.package.loaded("Xmisc")
x <- "Xmisc"
is.package.loaded(x) #FALSE
is.package.loaded(x,character.only=TRUE) #TRUE

Run the code above in your browser using DataLab