LocalFunction {Umacs} | R Documentation |
Generates an object that is used to define a local R function
in a sampler function generated by Sampler
.
Usually a call to this function is not necessary,
since LocalFunction
is implicitly done when the value of a named
parameter in the argument list of Sampler
is an R function.
LocalFunction(x)
x |
An R function |
LocalFunction
is to be used only within the Sampler
function call;
the value of the argument (x
) is made available (locally)
in a sampling function that is built using the Umacs function Sampler
.
The name of the parameter that will have the value (x
) is not
specified as an argument, but only within the Sampler
function call.
An object of class LocalFunction
,
to be further processed by the Umacs function Sampler
.
A call to LocalFunction
must be associated with a parameter name.
Components of vector parameters specified to be LocalFunction
s cannot be updated,
but those specified to be Data
can be updated.
To insert `raw code' in the iteration loop, use the function RawCode
.
Jouni Kerman <jouni@kerman.com>
Kerman, Jouni. Umacs: A Universal Markov Chain Sampler. Technical report, Columbia University, New York.
Umacs-package
for an overview of the Umacs package.
Sampler
for how to create a sampler function; see the vignette for details.
Package `rv'.