WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

ResourceFunction [resource]

represents the function associated with the specified resource.

ResourceFunction [resource,prop]

gives the specified property of the resource.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Options  
ResourceSystemPath  
ResourceVersion  
Properties & Relations  
Possible Issues  
See Also
Related Guides
Related Links
History
Cite this Page

ResourceFunction [resource]

represents the function associated with the specified resource.

ResourceFunction [resource,prop]

gives the specified property of the resource.

Details and Options

  • ResourceFunction ["name"] searches in order for a resource function with the specified name in the following locations:
  • locally in the session (for resource functions from DefineResourceFunction )
    at the locations specified by $PersistencePath
    in the Wolfram Function Repository
  • In ResourceFunction [resource], resource can have the following forms:
  • "name" function name, resolved as described
    ResourceObject [] a resource object of type "Function" stored at any location
    CloudObject [] a cloud object containing a function resource object
    LocalObject [] a local object containing a function resource object
  • ResourceFunction [resource][args ] applies the function to the given arguments.
  • The available properties are given by ResourceFunction [resource,"Properties"] and typically include properties of the ResourceObject as well as:
  • "SymbolName" fully qualified string name of the underlying function
    "FunctionLocation" file, object or method used to store the definition
    "DocumentationLink" URL for documentation of a published function
  • ResourceFunction accepts the following options:
  • ResourceSystemPath $ResourceSystemPath where to look for a function
    ResourceVersion Automatic version to select of a published resource
  • Function definitions in a function resource are typically not explicitly retrieved until the function is used.
  • When the definitions for a function resource are retrieved, they are usually cached in $LocalBase .
  • ResourceObject [ResourceFunction[]] returns the resource object containing the given function.
  • ResourceFunction [ResourceFunction[],prop] gives a property for an existing resource function.
  • CloudDeploy [ResourceFunction[]] or CloudPublish [ResourceFunction[]] saves a resource function in the cloud.
  • LocalCache [ResourceFunction[]] saves a resource function as a LocalObject [].
  • The following functions work on ResourceFunction objects: Attributes , Definition , DownValues , FullDefinition , Options and SymbolName .
  • New resource functions can be defined with DefineResourceFunction or with a definition notebook from File New Repository Item Function Repository Item.

Examples

open all close all

Basic Examples  (5)

Get a resource function using its name:

Wolfram Language code: ResourceFunction["NestedLookup"]

Apply the resource function to arguments:

Wolfram Language code: ResourceFunction["NestedLookup"][<|"Flintstones" -> <|"Fred" -> <|"Job" -> "Bronto crane Operator"|>, "Wilma" -> <|"Job" -> "Cavemaker"|>, "Pebbles" -> <|"Job" -> "Child"|>|>|>, {"Flintstones", "Fred", "Job"}]

Apply a function from a ResourceObject to a value:

Wolfram Language code: ResourceFunction[ResourceObject[Association["Name" -> "GrayCode", "UUID" -> "392603a7-1e9d-46d3-8532-bf09565c732a", "ResourceType" -> "Function", "Version" -> "1.0.0", "Description" -> "Find the Gray code for an integer", "RepositoryLocation" -> URL["http ... nctionRepository`$f2402e26e61b4c54b73496fc57b6504d`GrayCode", "FunctionLocation" -> CloudObject[ "https://www.wolframcloud.com/objects/0050708c-82d0-490c-b9a9-2c5e6b23a00b"], "ShortName" -> "GrayCode"], {ResourceSystemBase -> Automatic}]][100]

Find properties of a resource function:

Wolfram Language code: ResourceFunction["MoveMouse", "Description"]

Get the web documentation URL for a published function:

Wolfram Language code: ResourceFunction["MultiNonlinearModelFit", "DocumentationLink"]

Create a resource function from an Association :

Wolfram Language code: rf = ResourceFunction[<|"Name" -> "Half Squared", "Function" -> ((# / 2) ^ 2&), "ResourceType" -> "Function"|>]
Wolfram Language code: rf[20]

Scope  (7)

Use the two-argument from of ResourceFunction to retrieve properties:

Wolfram Language code: ResourceFunction["PerpendicularSurface", "Description"]

Get a list of properties:

Wolfram Language code: ResourceFunction["BirdSay", "Properties"]

Obtain information on a resource function:

Wolfram Language code: Information[ResourceFunction["BirdSay"]]

View basic usage:

Wolfram Language code: ResourceFunction["BirdSay", "Usage"]

Run all verification tests defined for a resource function to generate a TestReportObject :

Wolfram Language code: ResourceFunction["UUIDQ", "TestReport"]

A Missing object is returned for resource functions that do not have defined tests:

Wolfram Language code: ResourceFunction["BirdSay", "TestReport"]

See all the tests defined for a resource function in a testing notebook:

Wolfram Language code: ResourceFunction["UUIDQ", "TestNotebook"]

See when a resource function was first published to the Wolfram Function Repository:

Wolfram Language code: ResourceFunction["GrayCode", "ReleaseDate"]

Get the date of the most recent update:

Wolfram Language code: ResourceFunction["GrayCode", "LatestUpdate"]

Get a list of available versions:

Wolfram Language code: ResourceFunction["GrayCode", "VersionsAvailable"]

Options  (3)

ResourceSystemPath  (2)

Use ResourceSystemPath to limit the result to only find functions published in the function repository:

Wolfram Language code: ResourceFunction["InspectNotebook", ResourceSystemPath -> {URL["https://resources.wolframcloud.com"]}]

Create a new resource function with the same name as a deployed function:

Wolfram Language code: DefineResourceFunction["A bird said: " <> #&, "BirdSay"]

Use ResourceSystemPath to ensure this resource is found:

Wolfram Language code: myrf = ResourceFunction["BirdSay", ResourceSystemPath -> {PersistenceLocation["KernelSession"]}]
Wolfram Language code: myrf["Chirp"]

Instead, find the published function:

Wolfram Language code: publicrf = ResourceFunction["BirdSay", ResourceSystemPath -> {URL["https://resources.wolframcloud.com"]}]
Wolfram Language code: publicrf["Tweet"]

ResourceVersion  (1)

Get two versions of the same resource from the function repository using ResourceVersion :

Wolfram Language code: new = ResourceFunction["EasterSunday", ResourceVersion -> "3.0.0"]
Wolfram Language code: old = ResourceFunction["EasterSunday", ResourceVersion -> "2.0.0"]

Only the newer version supports a zero-argument form:

Wolfram Language code: new[]
Wolfram Language code: old[]

Properties & Relations  (3)

The two-argument form of ResourceFunction provides the same values as ResourceObject :

Wolfram Language code: ResourceFunction["GrayCode", "Description"]
Wolfram Language code: ResourceObject["GrayCode"]["Description"]

The underlying symbol belonging to a ResourceFunction can be obtained using the "Function" property:

Wolfram Language code: grayCode = ResourceFunction["GrayCode", "Function"]
Wolfram Language code: grayCode//InputForm

Using the symbol directly can often be faster:

Wolfram Language code: RepeatedTiming[grayCode[25]]
Wolfram Language code: RepeatedTiming[ResourceFunction["GrayCode"][25]]

Many functions that work on symbols also work on resource functions, for example, DownValues :

Wolfram Language code: DownValues[ResourceFunction["RankedTimeSeriesBarChart"]]

And Attributes :

Wolfram Language code: Attributes[ResourceFunction["TraceInteractive"]]

And Options :

Wolfram Language code: Options[ResourceFunction["MonitoredDownload"]]

Possible Issues  (1)

Resource functions that have holding attributes will only hold arguments if ResourceFunction [] is explicitly used as the head:

Wolfram Language code: SetAttributes[myHold, HoldFirst]; rf = DefineResourceFunction[myHold]
Wolfram Language code: rf[1 + 1]

Use ResourceFunction [][] instead to ensure attributes will work:

Wolfram Language code: ResourceFunction["myHold"][1 + 1]

Using the formatted form will also work:

Wolfram Language code: ResourceFunction["myHold"][1 + 1]

Alternatively, set the symbol to the underlying function instead:

Wolfram Language code: func = ResourceFunction["myHold", "Function"]
Wolfram Language code: func[1 + 1]
Wolfram Research (2019), ResourceFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/ResourceFunction.html.

Text

Wolfram Research (2019), ResourceFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/ResourceFunction.html.

CMS

Wolfram Language. 2019. "ResourceFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ResourceFunction.html.

APA

Wolfram Language. (2019). ResourceFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ResourceFunction.html

BibTeX

@misc{reference.wolfram_2026_resourcefunction, author="Wolfram Research", title="{ResourceFunction}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/ResourceFunction.html}", note=[Accessed: 14-August-2026]}

BibLaTeX

@online{reference.wolfram_2026_resourcefunction, organization={Wolfram Research}, title={ResourceFunction}, year={2019}, url={https://reference.wolfram.com/language/ref/ResourceFunction.html}, note=[Accessed: 14-August-2026]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /