Skip to contents

The $num_chains() method returns the number of chains in a CmdStanMCMC object or the number of chains used for standalone generated quantities in a CmdStanGQ object.

Usage

num_chains()

Value

An integer.

Examples

# \dontrun{
fit_mcmc <- cmdstanr_example(chains = 2)
fit_mcmc$num_chains()
#> [1] 2
# }