Learn R Programming

posterior (version 1.6.0)

order_draws: Order draws objects

Description

Order draws objects according to iteration and chain number. By default, draws objects are ordered but subsetting or extracting parts of them may leave them in an unordered state.

Usage

order_draws(x, ...)

# S3 method for draws_matrix order_draws(x, ...)

# S3 method for draws_array order_draws(x, ...)

# S3 method for draws_df order_draws(x, ...)

# S3 method for draws_list order_draws(x, ...)

# S3 method for draws_rvars order_draws(x, ...)

# S3 method for rvar order_draws(x, ...)

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.

...

Arguments passed to individual methods (if applicable).

See Also

repair_draws()

Examples

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

Run the code above in your browser using DataLab