CHAPTER 17

image

Using R for Simulation

R shines as a tool for simulations of all kinds. Simulations have been around for a very long time. I remember doing Monte Carlo simulations as a graduate student with FORTRAN-IV programs I wrote. That was fun, but R is far more versatile, and as a result, more fun.

In this chapter, we quickly revisit mathematical operations and also cover additional ones. We will also revisit input and output in R, adding to our current knowledge and skills new ways to get data into and out of R. But the most important topic of Chapter 17 is simulation. I will introduce the topic in a conceptual way and then illustrate it with ...

Get Beginning R: An Introduction to Statistical Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.