Updating R script