Introduction to Scientific Programming and Simulation Using R