An introduction to data analysis using R