mutateToRownames | R Documentation |
This function sets new row names for a data frame based on a tidy evaluation expression.
mutateToRownames(.data, expr, .remove = FALSE, .uniqueSep = ".")
.data |
A data frame. |
expr |
A tidy evaluation expression specifying the columns to use for the new row names. |
.remove |
A logical indicating whether to remove the selected columns. Default is FALSE. |
.uniqueSep |
A character string to separate duplicate row names when
ensuring uniqueness
with |
A data frame with updated row names.
library(dplyr)
mtcars %>%
head() %>%
mutateToRownames(wt + 3*vs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.