set_variables | R Documentation |
draws
objectsSet variable names for all variables in a draws
object. Useful
when using pipe operators.
set_variables(x, variables, ...)
x |
(draws) A |
variables |
(character) new variable names. |
... |
Arguments passed to individual methods (if applicable). |
Returns a draws
object of the same format as x
, with
variables named as specified.
variables
x <- as_draws(matrix(rnorm(100), ncol = 2))
variables(x)
x <- set_variables(x, c("theta[1]", "theta[2]"))
variables(x)
# this is equivalent to
variables(x) <- c("theta[1]", "theta[2]")
variables(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.