Adding R scripts to compute statistics