Name-value pairs of expressions, each with either length 1 or the
same length as in the entire input (i.e., number of iterations or draws).
The name of each argument will be the name of a new variable, and the value
will be its corresponding value. Use a NULL value in mutate_variables
to drop a variable. New variables overwrite existing variables of the same
name.
Value
Returns a draws object of the same format as .x, with variables mutated
according to the expressions provided in ....
Details
In order to mutate variables in draws_matrix and draws_array objects,
they are transformed to draws_df objects first and then transformed back
after mutation. As those transformations are quite expensive for larger
number of draws, we recommend using mutate_variables on draws_df and
draws_list objects if speed is an issue.
In draws_rvars objects, the output of each expression in ... is
coerced to an rvar object if it is not already one using as_rvar().