R script changes