Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

rename columns based on a variable in r

df <- rename(df, new_name = old_name) #For renaming dataframe column
 
tbl <- rename(tbl, new_name = old_name) #For renaming tibble column
 
tbl <- tbl %>% rename(new_name = old_name) #For renaming tibble column using dplyrpipe 
                                           #operator 
Source by honingds.com #
 
PREVIOUS NEXT
Tagged: #rename #columns #based #variable
ADD COMMENT
Topic
Name
6+8 =