rename columns with dplyr code example Example: Pass a variable to dplyr "rename" to change columnname df %>% rename(!!variable := name_of_col_from_df)