Functions for cleaning data in R.