Learn R Programming

universals (version 0.0.1)

nsims: Number of Simulations

Description

Gets the number of simulations (iterations * chains) of an MCMC object.

The default methods returns the product of nchains() and niters().

Usage

nsims(x, ...)

# S3 method for default nsims(x, ...)

Arguments

x

An object.

...

Other arguments passed to methods.

Value

An integer scalar of the number of simulations.

See Also

Other MCMC dimensions: nchains(), niters(), npars(), nsams(), nterms()

Examples

Run this code
# NOT RUN {
nsims.foobar <- function(x, ...) {
  niters(x, ...) * nchains(x, ...)
}
# }

Run the code above in your browser using DataLab