The $num_chains() method returns the number of MCMC chains.

num_chains()

Value

An integer.

See also

Examples

if (FALSE) { # \dontrun{
fit_mcmc <- cmdstanr_example(chains = 2)
fit_mcmc$num_chains()
} # }