nimPrint: print function for use in nimbleFunctions, where it is...

Description Usage Arguments Details Examples

Description

print function for use in nimbleFunctions, where it is identical to print. Works in R or NIMBLE, not quite identically.

Usage

1

Arguments

...

an abitrary set of arguments that will be printed in sequence

Details

The keyword print in nimbleFunction run-time code will be automatically turned into nimPrint. This is a function that prints its arguments int order using cat in R, or using std::cout in C++ code generated from compiling nimbleFunctions. Non-scalar numeric objects can be included, although their output will be formatted slightly different in uncompiled and compiled nimbleFunctions.

Examples

1
2
ans <- matrix(1:4, nrow = 2) ## R code, not NIMBLE code
nimPrint('Answer is ', ans, '\n') ## would work in R or NIMBLE

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