How To Calculate Summary Statistics In R