Skip to contents

Summarizes one function's location, documentation, arguments, direct calls, method family, and static risk signals without requiring an example call.

Usage

explain_function(graph, name)

Arguments

graph

An insider_graph object, a source directory, or an installed package name.

name

Exact function name to explain.

Value

An insider_function_explanation object. Its print method presents a compact human-readable summary. The object includes direct callees, direct callers, and non-default package dependencies reached by one-hop external callees.

Examples

explain_function("stats", "sd")
#> 
#> ── sd ──────────────────────────────────────────────────────────────────────────
#> Kind: function | Location: stats namespace (no line references) | exported
#> Documentation
#> Title: Standard Deviation
#> Description: This function computes the standard deviation of the values in x .
#> If na.rm is TRUE then missing values are removed before computation proceeds.
#> Arguments
#> x
#> na.rm = FALSE
#> Callees
#> Internal: var
#> External: as.double (base), if (base), is.factor (base), is.vector (base), sqrt
#> (base), || (base)
#> Callers (2): bw.SJ, bw.nrd0
#> Package dependencies
#> Package dependencies: none (base R only)
#> Method family
#> not identified as an S3 method
#> Risk notes
#> • none identified