Software used in the Lessons

These Lessons use about a dozen new R functions. Some of these are used frequently in examples and exercises and are worth mastering. Others appear only in demonstrations.


These lessons contain demonstrations illustrating statistical concepts or data analysis strategies. We will place these in a distinctive box, of which this is an example.

The demonstrations will often contain new computer commands that perform tasks used in teaching statistics. However, readers are not expected to be able to construct such commands on their own.


Here are some of the command structures that appear in demonstrations. These explanations give a general idea of the tasks they perform.

  • do(10) * { command } causes the command to be executed repeatedly the indicated number of times. Such repetitions are useful when the command is a trial of a random process such as sampling, resampling, or shuffling.
  • function(arguments) { set of commands } packages in a single unit a set of one or more commands. The packaging facilitates using them over and over again with specified arguments.
  • geom_errorbar() works much like geom_point() but draws vertical bars instead of dots. Bar-shaped glyphs depict intervals such as confidence or prediction intervals.
  • geom_ribbon() is like geom_line() but for intervals.
  • effect_size() calculates the strength and direction of the input-output relationship between the response variable of a model and a selected one of the explanatory variables.