Clean column names

You might have read that column names should not include spaces or special characters. Inevitably, you’ll encounter data that are not so tidy. For example:

##   First Name Last Name date of birth
## 1      Homer   Simpson      1/1/1960
## 2      Marge   Simpson    10/20/1965
## 3        Ned  Flanders     3/22/1961

To tidy it up, you can use the clean_names() function from the janitor package:

janitor::clean_names(df)