Check if packages are installed or attached
check_pkg_status(..., status, use_list = FALSE)
(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
.
(Character) "installed"
checks if packages are installed.
"attached"
checks if packages are currently attached.
(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.
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
.