skip to primary navigation skip to content

Core Statistics in R

1 Overview

These sessions are intended to enable you to perform core data analysis techniques appropriately and confidently using R.

  • 6 lecture-practicals

  • Ongoing formative assessment exercises

  • No formal assessment

  • No mathematical derivations

  • No pen and paper calculations

They are not a “how to mindlessly use a stats program” course!

1.1 Core aims

To know what to do when presented with an arbitrary dataset e.g.

  1. Know what data analysis techniques are available
  2. Know which ones are allowable
  3. Be able to carry these out and understand the results

1.3 Practicals

Each practical document is divided up into various sections. In each section there will be some explanatory text which should help you to understand what is going on and what you’re trying to achieve. There may be a list of commands relevant to that section which will be displayed in boxes like this:

Conditional operators

To set filtering conditions, use the following relational operators:

  • > is greater than
  • >= is greater than or equal to
  • < is less than
  • <= is less than or equal to
  • == is equal to
  • != is different from
  • %in% is contained in

To combine conditions, use the following logical operators:

  • & AND
  • | OR

1.4 Datasets

This course uses various data sets. The easiest way of accessing these is by creating an R-project in RStudio. Then download the data folder here by right-clicking on the link and Save as…. Next unzip the file and copy it into your working directory. Your data should then be accessible via <working-directory-name>/data/tidy.