Update R script