nfMethod: access (call) a member function of a nimbleFunction

View source: R/nimbleFunction_Rexecution.R

nfMethodR Documentation

access (call) a member function of a nimbleFunction

Description

Internal function for accessing a member function (method) of a nimbleFunction. Normally a user will write nf$method(x) instead of nfMethod(nf, method)(x).

Usage

nfMethod(nf, methodName)

Arguments

nf

a specialized nimbleFunction, i.e. one that has already had setup parameters processed

methodName

a character string giving the name of the member function to call

Details

nimbleFunctions have a default member function called run, and may have other member functions provided via the methods argument to nimbleFunction. As an internal step, the NIMBLE compiler turns nf$method(x) into nfMethod(nf, method)(x), but a NIMBLE user or programmer would not normally need to use nfMethod directly.

Value

a function that can be called.

Author(s)

NIMBLE development team


nimble documentation built on July 9, 2023, 5:24 p.m.