as.matrix.checkglobals {checkglobals} | R Documentation |
Cast to matrix
Description
Cast an S3-object of class "checkglobals"
to a matrix.
Usage
## S3 method for class 'checkglobals'
as.matrix(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 character matrix with three columns:
-
name
, the name of the global or imported function/variable. -
package
, the import package, only applies to imported functions/variables. -
type
, the type of the detected entity, either"global"
or "import".
See Also
Examples
## R-package from folder
chk <- checkglobals(
pkg = system.file(
"unit_tests", "pkg", "testpkg",
package = "checkglobals"
)
)
as.matrix(chk)
## include only selected imports
as.matrix(chk, pattern = "coef", which = "import")