as_vector.checkglobals {checkglobals} | R Documentation |
Cast to list vector
Description
Cast an S3-object of class "checkglobals"
to a list vector.
Usage
## S3 method for class 'checkglobals'
as_vector(x, pattern, which = c("global", "import"), ...)
Arguments
x |
object inheriting from class |
pattern |
an optional regular expression. Only names
matching |
which |
a character vector, either |
... |
additional arguments to configure the output:
|
Value
a list consisting of three character vectors:
-
global
, vector of global function/variable names. -
import
, vector of import function/variable names. -
package
, vector of import package names.
Examples
## R-package from folder
chk <- checkglobals(
pkg = system.file(
"unit_tests", "pkg", "testpkg",
package = "checkglobals"
)
)
as_vector(chk)
## include only selected imports
as_vector(chk, pattern = "coef", which = "import")