setnsims {rv} | R Documentation |
Sets or retrieves the default number of simulations.
setnsims(nsims) getnsims()
nsims |
Number of simulations. |
getnsims()
is an alias for the function call setnsims()
.
If nsims
is specified, returns the old value,
else returns the current value.
Kerman, Jouni and Gelman, Andrew. Manipulating and Summarizing Posterior Simulations Using Random Variable Objects. Technical report, Columbia University, New York.
setnsims(1000) # set n.sims to 1000 s <- setnsims(10000) # s is now 1000 print(getnsims()) # prints 10000 setnsims(s) # restore the number of simulations back to 1000