View source: R/nimbleFunction_Rexecution.R
nimPrint | R Documentation |
print function for use in nimbleFunctions
nimPrint(...)
... |
an abitrary set of arguments that will be printed in sequence. |
The keyword print
in nimbleFunction run-time code will be automatically turned into nimPrint
. This is a function that prints its arguments in order using cat
in R, or using std::cout
in C++ code generated by compiling nimbleFunctions.
Non-scalar numeric objects can be included, although their output will be formatted slightly different in uncompiled and compiled nimbleFunctions.
cat
ans <- matrix(1:4, nrow = 2) ## R code, not NIMBLE code
nimPrint('Answer is ', ans) ## would work in R or NIMBLE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.