View source: R/rename_variables.R
rename_variables | R Documentation |
draws
objectsRename variables in a draws
object.
rename_variables(.x, ...)
## S3 method for class 'draws'
rename_variables(.x, ...)
.x |
(draws) A |
... |
One or more expressions, separated by commas, indicating the
variables to rename. The variable names can be unquoted
( |
Returns a draws
object of the same format as .x
, with variables renamed
according to the expressions provided in ...
.
variables
, variables<-
, mutate_variables
x <- as_draws_df(example_draws())
variables(x)
x <- rename_variables(x, mean = mu, sigma = tau)
variables(x)
x <- rename_variables(x, b = `theta[1]`) # or b = "theta[1]"
variables(x)
# rename all elements of 'theta' at once
x <- rename_variables(x, alpha = theta)
variables(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.