check_pkg_status: Check if packages are installed or attached

Description Usage Arguments Value

View source: R/check_pkg_status.R

Description

Check if packages are installed or attached

Usage

1
check_pkg_status(..., status, use_list = FALSE)

Arguments

...

(Dots) Package names as bare names, strings, or a vector of strings. If left blank, returns a list of all packages that are installed/attached depending on the value of status.

status

(Character) "installed" checks if packages are installed. "attached" checks if packages are currently attached.

use_list

(Logical) If TRUE, a character vector of package names was passed in ..1, so use that as the results list. This is for programming use; nse_dots() already detects if a char vector of length > 1 is in ..1 and uses it as the package list automatically, but it does not do that for char vectors of length 1 because the user can offer a mix of names and strings to ... as a convenience.

Value

If dots is empty, a character vector of package names. Otherwise, return a named logical vector where TRUE means the package is installed or attached, depending on the value of status.


librarian documentation built on May 2, 2019, 1:29 p.m.