draws-index {posterior}R Documentation

Index draws objects

Description

Index iterations, chains, and draws of draws objects.

Usage

iteration_ids(x)

chain_ids(x)

draw_ids(x)

niterations(x)

nchains(x)

ndraws(x)

Arguments

x

(draws) A draws object or another R object for which the method is defined.

Details

The methods iteration_ids(), chain_ids(), and draw_ids() return vectors of all iterations, chains, and draws, respectively. In contrast, the methods niterations(), nchains(), and ndraws() return the number of variables, iterations, chains, and draws, respectively.

Value

For iteration_ids(), chain_ids(), and draw_ids(), an integer vector.

For niterations(), nchains(), and ndraws(), a scalar integer.

See Also

variables, rename_variables

Examples

x <- example_draws()

iteration_ids(x)
niterations(x)

chain_ids(x)
nchains(x)

draw_ids(x)
ndraws(x)


[Package posterior version 1.6.0 Index]