library("dplyr")
data <- tibble::rownames_to_column(data, "row_names") # Apply rownames_to_column
data # Print updated data
# row_names x1 x2
# 1 1 A e
# 2 2 B d
# 3 3 C c