Addition of r script to perform analysis