Answers for "r data table change column name"

R
1

rename columns in table r

rename(table_name, new_column = old_column)

#For multiple column change:
rename(table_name, new_column = old_column, new_col2 = old_col2)
Posted by: Guest on September-22-2021
0

R change column to row names

samp2 <- samp[,-1]
rownames(samp2) <- samp[,1]
Posted by: Guest on May-11-2021

Code answers related to "r data table change column name"

Browse Popular Code Answers by Language