Added a few preprocessing functions from Caret.