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

num_chains()

Value

An integer.

See also

Examples

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