dplyr (version 0.4.3)

add_rownames: Convert row names to an explicit variable.

Description

Convert row names to an explicit variable.

Usage

add_rownames(df, var = "rowname")

Arguments

df
Input data frame with rownames.
var
Name of variable to use

Examples

Run this code
mtcars %>% tbl_df()

mtcars %>% add_rownames()

Run the code above in your browser using DataCamp Workspace