R Hacer columna de Rownames
library(dplyr)
df <- tibble::rownames_to_column(df, "VALUE")
Scary Swan
library(dplyr)
df <- tibble::rownames_to_column(df, "VALUE")
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
d <- cbind(rownames(d), data.frame(d, row.names=NULL))
data$row_names <- row.names(data) # Apply row.names function
data # Print updated data
# x1 x2 row_names
# 1 A e 1
# 2 B d 2
samp2 <- samp[,-1]
rownames(samp2) <- samp[,1]