Learn R Programming

nimble (version 1.2.1)

nfMethod: 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)

Value

a function that can be called.

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

Author

NIMBLE development team

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.