colnames(existing_df) <- new_col_names
The author probably wanted to say instead:
colnames(existing_df) <- new_col_names;