check_attached {librarian}R Documentation

Check if packages are attached

Description

Check if packages are attached

Usage

check_attached(...)

Arguments

...

(Dots) Package names as bare names, strings, or a character vector. If left empty, lists all attached packages.

Value

If dots is empty, a character vector of all attached packages. Otherwise, return a named logical vector where TRUE means the package is attached

Examples

## Not run: 
check_attached()

#>   [1] "librarian" "testthat"  "magrittr"  "stats" ...

check_attached(c("utils", "stats"))

#> utils stats 
#> TRUE  TRUE 

check_attached("datasets", "base", fakepkg)

#> datasets     base  fakepkg 
#>     TRUE     TRUE    FALSE 

## End(Not run)


[Package librarian version 1.8.1 Index]