Code and exercises of the book “Hands-On Programming with R: Write Your Own Functions and Simulations".