# NOT RUN {
# Detect row names ----------------------------------------------------
has_rownames(mtcars)
has_rownames(iris)
# Remove row names ----------------------------------------------------
remove_rownames(mtcars) %>% has_rownames()
# Convert between row names and column --------------------------------
mtcars_tbl <- rownames_to_column(mtcars, var = "car") %>% as_tibble()
mtcars_tbl
column_to_rownames(mtcars_tbl, var = "car") %>% head()
# Adding rowid as a column --------------------------------------------
rowid_to_column(iris) %>% head()
# }
Run the code above in your browser using DataLab