rDataToCorpus(): pass data as arguement