Function Repository Resource:

ResourceFunctionDefinitionViewer

Source Notebook

View the definitions of a resource function along with its dependencies

Contributed by: Richard Hennigan (Wolfram Research)

ResourceFunction["ResourceFunctionDefinitionViewer"][ResourceFunction[]]

view the definitions associated with a ResourceFunction.

ResourceFunction["ResourceFunctionDefinitionViewer"][sym]

view the definitions of the symbol sym and its dependencies.

Details and Options

ResourceFunction["ResourceFunctionDefinitionViewer"] has the following options:
"ExcludedContexts"Automaticwhich contexts to exclude when searching for dependent symbols

Examples

Basic Examples (2) 

View the definitions of a ResourceFunction:

In[1]:=
ResourceFunction["ResourceFunctionDefinitionViewer"][
 ResourceFunction["MoveMouse"]]
Out[1]=

View the definitions of a symbol:

In[2]:=
f[x_] := g[x + 1];
g[x_] := 2 x;
myFunction[x_] := f[x];
ResourceFunction["ResourceFunctionDefinitionViewer"][myFunction]
Out[5]=

Options (2) 

ExcludedContexts (2) 

By default, many contexts will not be checked when looking for dependent definitions:

In[6]:=
ResourceFunction[
 "ResourceFunctionDefinitionViewer"][DefineResourceFunction]
Out[6]=

Search anywhere except "System`" for dependent symbols:

In[7]:=
ResourceFunction[
 "ResourceFunctionDefinitionViewer"][DefineResourceFunction, "ExcludedContexts" -> {"System`"}]
Out[7]=

Requirements

Wolfram Language 11.3 (March 2018) or above

Version History

  • 2.0.1 – 14 June 2021

Related Resources

License Information