PreProcessing Data file and PNG files and R code