Answers for "assign column name with index in r"

1

how to set a column as index r

rownames(df) <- df$Date
Posted by: Guest on April-30-2021
0

Change column name of specific R column by index

colnames(df)[col_indx] <- “new_col_name_at_col_indx”

#More specifically,
colnames(df)[3] <- "column3" #Names the third column of df as "column3".
Posted by: Guest on June-24-2021

Code answers related to "assign column name with index in r"

Browse Popular Code Answers by Language