Learn R Programming

nlist (version 0.1.1)

nchains: Number of MCMC chains

Description

Gets the number of chains of an MCMC object.

Usage

nchains(x, ...)

# S3 method for nlist nchains(x, ...)

# S3 method for nlists nchains(x, ...)

Arguments

x

An MCMC object

...

Unused

Value

A count indicating the number of MCMC chains

Methods (by class)

  • nlist: Number of chains of an nlists_object.

    Always 1L.

  • nlists: Number of chains of an nlists_object.

Examples

Run this code
# NOT RUN {
nchains(nlist(x = 1:2))
nchains(nlists(nlist(x = c(2, 9)), nlist(x = c(1, 7))))
nchains(split_chains(nlists(nlist(x = c(2, 9)), nlist(x = c(1, 7)))))
# }

Run the code above in your browser using DataLab