Learn R Programming

posterior (version 1.6.0)

repair_draws: Repair indices of draws objects

Description

Repair indices of draws objects so that iterations, chains, and draws are continuously and consistently numbered.

Usage

repair_draws(x, order = TRUE, ...)

# S3 method for draws_matrix repair_draws(x, order = TRUE, ...)

# S3 method for draws_array repair_draws(x, order = TRUE, ...)

# S3 method for draws_df repair_draws(x, order = TRUE, ...)

# S3 method for draws_list repair_draws(x, order = TRUE, ...)

# S3 method for draws_rvars repair_draws(x, order = TRUE, ...)

# S3 method for rvar repair_draws(x, order = TRUE, ...)

Value

A draws object of the same class as x.

Arguments

x

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

order

(logical) Should draws be ordered (via order_draws()) before repairing indices? Defaults to TRUE.

...

Arguments passed to individual methods (if applicable).

See Also

order_draws()

Examples

Run this code
x <- as_draws_array(example_draws())
(x <- x[10:5, 3:4, ])
repair_draws(x)

Run the code above in your browser using DataLab