Learn R Programming

posterior (version 1.6.0)

draws-index: 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)

Value

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

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

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.

See Also

variables, rename_variables

Examples

Run this code
x <- example_draws()

iteration_ids(x)
niterations(x)

chain_ids(x)
nchains(x)

draw_ids(x)
ndraws(x)

Run the code above in your browser using DataLab