doing analytics using R