Mutate variables in a
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
mutate_variables(.x, ...) ## S3 method for class 'draws_matrix' mutate_variables(.x, ...) ## S3 method for class 'draws_array' mutate_variables(.x, ...) ## S3 method for class 'draws_df' mutate_variables(.x, ...) ## S3 method for class 'draws_list' mutate_variables(.x, ...) ## S3 method for class 'draws_rvars' mutate_variables(.x, ...)
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
In order to mutate variables in
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
draws_list objects if speed is an issue.
draws_rvars objects, the output of each expression in
coerced to an
rvar object if it is not already one using
draws object of the same format as
.x, with variables mutated
according to the expressions provided in
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.