extract_draws: Extract parameters' draws

Description Usage Arguments Value Examples

View source: R/draws.R

Description

Extract parameters' draws

Usage

1
extract_draws(obj, draws)

Arguments

obj

Array/Vector/Matrix of draws (cf. first dimension) or list of it.

draws

Vector of draws to extract.

Value

Dataframe with columns: Draw, Index, Value and Parameter.

Examples

1
2
3
4
5
6
7
x <- rnorm(1e3)
X <- matrix(x, ncol = 10)
a <- array(rnorm(80), dim = c(10, 2, 2, 2))
extract_draws(x, sample(1:length(x), 10))
extract_draws(X, sample(1:nrow(X), 10))
extract_draws(a, sample(1:10, 5))
extract_draws(list(x = x, X = X, a = a), 1:10)

HuraultMisc documentation built on Sept. 6, 2021, 9:09 a.m.