mutateToRownames {FastUtils} | R Documentation |
Mutate columns to Row Names
Description
This function sets new row names for a data frame based on a tidy evaluation expression.
Usage
mutateToRownames(.data, expr, .remove = FALSE, .uniqueSep = ".")
Arguments
.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 |
Value
A data frame with updated row names.
Examples
library(dplyr)
mtcars %>%
head() %>%
mutateToRownames(wt + 3*vs)
[Package FastUtils version 0.1.1 Index]