23 March 2018

What is R and why use it?

  • Statistical programming language
  • Used around the world
  • Open source
    • Free as in beer
    • Free as in speech

Help!

The R interface

The R interface

Packages

R signposts

  • function() Anything with brackets is a function, like a spreadsheet
  • %>% A pipe can send output from a function to the next line
  • <- and = can generally be used
  • ?function brings up help menu
  • # this is a comment

Helpful lingo

  • "Data frame" is a table with rows and columns
  • "Vector" is a set of values that are all the same type:
    • Numeric
    • Character

Tidyverse packages

  • readr for reading plain text files
  • dplyr for database type operations
  • tidyr for wide to long transformations
  • ggplot2 for visualisation