Third R script