Introduction to Scientific Programming and Simulation Using R, Second Edition

Owen Jones, Robert Maillardet, and Andrew Robinson 

Welcome to the home page for our book: Introduction to Scientific Programming and Simulation Using R, Second Edition.

For a quick overview read the Table of Contents and the Preface.

The book is currently in print and available at major online booksellers.

Important news

The cover image is a simulation of water running down a slope. The slope is divided into cells. Rain falls on each cell, and infiltrates into the soil at a randomly generated rate. Any excess rainfall runs off down the slope, either straight down, down and to the left, or down and to the right, adding to the rainfall in the destination cell. The plot shows the level of runoff generated at each cell, with darker colours indicating more runoff. In this example, the rainfall rate is less than the average infiltration rate, yet we still get significant runoff, thanks to the channelling created by the random direction of the runoff. You can download the code for the simulation here.


Our email addresses: 

Solutions to exercises: We have solutions to some of the text exercises, which we are happy to provide to instructors. Please email us. We will be adding more solutions in due course, but we encourage anyone using the text to get in touch with us if they have questions about particular exercises.

Lecture slides: We have some lecture slides developed for teaching a course using the text. We are happy to provide these to instructors, but they would have to be used with some care, as they were prepared with a particular cohort in mind, and would not be suitable for students at all levels.

R programs and datasets: Longer R programs and all datasets used in the book can be found in the spuRs package for R (details of how to get this are given in Section 1.6 of the book).  These are also available in this gzip archive or this zip archive.

Errata:  Please email us if you find any typographical or other errors.

Errata for the first edition:  Errata (at November 2013).

Home page - Introduction to Scientific Programming and Simulation Using R -- page last modified: 23 July, 2014 -- Maintained by rjmail at