Added a second R file for running the simulations.
Formatted the code, added comments, and added the option to make a plot or not.