dplyr rename column names by position code example Example: Pass a variable to dplyr "rename" to change columnname df %>% rename(!!variable := name_of_col_from_df)