Learn R Programming

dplyr (version 0.5.0)

add_rownames: Convert row names to an explicit variable.

Description

Deprecated, use rownames_to_column instead.

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 DataLab