Book conventions

Here is an example of some R code.

print("This is some R code")
> [1] "This is some R code"

The top line is an R code statement whose function is hopefully self-evident. The bottom line commencing "> [1]" is the output the R code produces.

The following typographical conventions are used in this book:

  • R code, including variable names are in a non-proportionally spaced font, e.g., var1.
  • R package names are surrounded by curly brackets, e.g., {caret} for the caret package.
  • R function names are followed by parentheses, e.g., summary(), unless they form part of an R expression e.g., results1 <- summary(y).
  • <filename>.R conveys a place holder, between the < and >, where you replace it with your desired filename, e.g., myfile.R.

In addition, look out for:

Each chapter and many major sections will commence with an overall aim or learning objective.

Important to-do items. There are often dependencies so don’t assume they can be skipped.

Tips and (hopefully) helpful suggestions.

Definitions of technical terms.

Questions to reflect on. But note, not everything has a simple answer nor necessarily clear cut. The deeper you delve, the more apparent this is likely to become.

Each Chapter ends with a quick quiz which can be used by the reader to assess their understanding. Some feedback is provided when incorrect answers are given.

This book is a work in progress. Where the content is either yet to be written or in a state of flux, I will use this warning banner! This is particularly true for the later chapters. Sorry! In an entirely predictable manner this book project has grown and grown!