nfMethod: access a member function (or method) of a nimbleFunction

Description Usage Arguments Details Value Author(s)

Description

access (call) a member function of a nimbleFunction other than run, which calling the nimbleFunction directly uses. Works in R and NIMBLE.

Usage

1
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. nfMethod is primarily used to call the latter, although it could be used with methodName = 'run'. Normally arguments will be provided after nfMethod, e.g. nfMethod(myNimbleFunction, 'foo')(x).

Value

a function that can be called.

Author(s)

NIMBLE development team


thirdwing/nimble documentation built on May 31, 2019, 10:41 a.m.