draws-index | R Documentation |
draws
objectsIndex variables, iterations, chains, and draws.
variables(x, ...)
variables(x) <- value
iteration_ids(x)
chain_ids(x)
draw_ids(x)
nvariables(x, ...)
niterations(x)
nchains(x)
ndraws(x)
x |
(draws) A |
... |
Arguments passed to individual methods (if applicable). |
value |
(character vector) For |
The methods variables()
, iteration_ids()
, chain_ids()
, and draw_ids()
return
vectors of all variables, iterations, chains, and draws, respectively. In
contrast, the methods nvariables()
, niterations()
, nchains()
, and
ndraws()
return the number of variables, iterations, chains, and draws,
respectively.
variables(x) <- value
allows you to modify the vector of variable names,
similar to how names(x) <- value
works for vectors and lists. For renaming
specific variables, set_variables()
works equivalently, but is more intuitive when using the pipe operator. rename_variables()
may offer a more convenient approach.
For variables()
, a character vector.
For iteration_ids()
, chain_ids()
, and draw_ids()
, an integer vector.
For niterations()
, nchains()
, and ndraws()
, a scalar integer.
x <- example_draws()
variables(x)
nvariables(x)
variables(x) <- letters[1:nvariables(x)]
iteration_ids(x)
niterations(x)
chain_ids(x)
nchains(x)
draw_ids(x)
ndraws(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.