R script for analysis