added R script with analysis code