correction in R script