Programming using R