Cast an S3-object of class "checkglobalsi" to a data.frame.
Usage
# S3 method for class 'checkglobalsi'
as.data.frame(x, row.names = NULL, optional = FALSE, pattern, ...)Arguments
- x
object inheriting from class
"checkglobalsi".- row.names
currently not used, included for compatibility with
as.data.framegeneric.- optional
currently not used, included for compatibility with
as.data.framegeneric.- pattern
an optional regular expression. Only names matching
patternare returned.glob2rxcan be used to convert wildcard patterns to regular expressions.- ...
additional arguments to configure the output:
all.names, a logical value. IfTRUE, all object names are returned. IfFALSE, names which begin with a . are omitted. Defaults toTRUE.sorted, a logical value indicating if the function/variable names should be sorted alphabetically. Defaults toTRUE.
Value
a data.frame similar in format to as.data.frame.checkglobals.
Examples
## R-package from folder
chk <- checkglobals(
pkg = system.file(
"unit_tests", "pkg", "testpkg",
package = "checkglobals"
)
)
as.data.frame(chk$imports)
#> name package type
#> 1 R6Class R6 import
#> 2 is.unit grid import
#> 3 getMethod methods import
#> 4 setGeneric methods import
#> 5 setMethod methods import
#> 6 pvec parallel import
#> 7 aggregate stats import
#> 8 approxfun stats import
#> 9 coef stats import
#> 10 median stats import
#> 11 sd stats import
#> 12 coef stats4 import
#> 13 globalVariables utils import
#> 14 head utils import
#> 15 maintainer utils import
#> 16 tail utils import