Update R scripts