r column to rownames

# Assuming 'df' is your data frame and 'column_name' is the column you want to set as row names
rownames(df) <- df$column_name
df <- df[, -which(names(df) == "column_name")]