Beginning of R script