Learn R Programming

nimbleSCR (version 0.2.1)

makeConstantNimbleFunction: nimble constant function generator

Description

Create global constants that can be used in nimble functions. As of nimble 0.6-12 there does not appear to be official support for global constants. This function creates functions that can be used in place of constants.

Usage

makeConstantNimbleFunction(inValue, isDouble = TRUE)

Value

An object of the type returned by nimbleFunction that can be called inside other nimble code to retrieve the value of the global constant.

Arguments

inValue

Scalar to be set as a constant

isDouble

Logical. If TRUE the constant is a numeric scalar, and if FALSE the constant is an integer.

Author

Joseph D. Chipperfield

Examples

Run this code
maxMNormTrunc <- makeConstantNimbleFunction(0.0001, TRUE)   

Run the code above in your browser using DataLab