adding preprocessing data in R file