Statistical analysis using R