Learn R Programming

rv (version 0.949)

rvnsims: Number of simulations stored in each component of an rv object

Description

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

Usage

rvnsims(x)

Arguments

x
an rv object

Value

  • A vector of integers.

Details

If the argument is a number, rvnsims returns 1.

References

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

Examples

Run this code
#
  rvnsims(1.23)             # one
  x <- rvnorm(1)            # an rv
  rvnsims(x)                # equal to setnsims()
  rvnsims(x)==nrow(sims(x)) # TRUE
  rvnsims(x)==setnsims()    # TRUE

Run the code above in your browser using DataLab