setnsims {rv}R Documentation

Set or Get the Default Number of Simulations to Generate for rv Objects

Description

Sets or retrieves the default number of simulations.

Usage

  setnsims(nsims)
  getnsims()

Arguments

nsims Number of simulations.

Details

getnsims() is an alias for the function call setnsims().

Value

If nsims is specified, returns the old value, else returns the current value.

References

Kerman, Jouni and Gelman, Andrew. Manipulating and Summarizing Posterior Simulations Using Random Variable Objects. Technical report, Columbia University, New York.

Examples

  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

[Package rv version 0.949 Index]