get_global_calls

0th

Percentile

Get global function calls from a function

Note the results are approximate only. R's dynamic nature does not allow us to always find the global calls reliably.

Keywords
internal
Usage
get_global_calls(func, funcname, envir = parent.frame())
Arguments
func
The function to examine.
funcname
Name of the function.
envir
The environment containing the function. This environment is also used to look for S3 methods.
Details

Calls can be:

  • Direct function calls.
  • Function calls via do.call.
  • Calls to external functions via .C, .Call, etc.
  • We assume that an S3 generic calls all its methods in the supplied environment.

Internally we use findGlobals for finding the global calls and variables.

Note that by default calls to base function are also included in the result, even of they are primitive functions (e.g. <-, ==, etc.).

Value

A data frame of function calls and call types.

Aliases
  • get_global_calls
Documentation reproduced from package functionMap, version 1.0.0, License: GPL-2

Community examples

Looks like there are no examples yet.