Data cleaning in r pdf