Simulations using R