overlay R script