Initial R script based on previous R script.