repair_draws: Repair indices of 'draws' objects

Description Usage Arguments Value See Also Examples

View source: R/repair_draws.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
repair_draws(x, order = TRUE, ...)

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

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

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

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

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

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

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).

Value

A draws object of the same class as x.

See Also

order_draws()

Examples

1
2
3
x <- as_draws_array(example_draws())
(x <- x[10:5, 3:4, ])
repair_draws(x)

posterior documentation built on Sept. 9, 2021, 5:07 p.m.