GetCalls.Rd
For screening purposes it can be useful to get a list of all function calls our function may depend on. GetCall()
parses the function source and return all found function calls grouped by their package.
GetCalls(fun, alphabetic = TRUE, package = NULL)
a list of vectors structered by package
LsFct()
GetCalls("t.test.default")
#> $`package:base`
#> [1] "abs" "attr" "c" "class" "deparse1"
#> [6] "is.finite" "is.na" "is.null" "length" "list"
#> [11] "match.arg" "max" "mean" "missing" "names"
#> [16] "paste" "sqrt" "stop" "substitute"
#>
#> $`package:stats`
#> [1] "complete.cases" "pt" "qt" "setNames"
#> [5] "var"
#>
sapply(c("Closest", "Format"),
function(x) paste(unname(unlist(GetCalls(x))), collapse=", "))
#> Closest
#> "IsZero, abs, c, is.na, length, list, mapply, min, return, which"
#> Format
#> "UseMethod, c, list"