nsims {rv}R Documentation

Number of simulations stored in each component of an rv object

Description

nsims returns the number of simulations stored in each component of its argument.

Usage

  nsims(x)

Arguments

x an rv object

Details

If the argument is a number, nsims returns 1.

Value

A vector of integers.

Author(s)

Jouni Kerman kerman@stat.columbia.edu http://www.stat.columbia.edu/~kerman

References

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

Examples

  #
  nsims(1.23)
  x <- rvnorm(1)
  nsims(x)
  nsims(x)==nrow(sims(x)) # Should be TRUE
  nsims(x)==rvnsims()     # Should be TRUE

[Package rv version 0.925 Index]