updated the R code to use png() instead of dev.copy(), new png files
updated files with changes merged and corrected