Working with data

Real data, base R

The programming basics tutorial showed you how R works. This tutorial puts that to use on a real dataset: monthly weather records from Durham University Observatory, which the Met Office publishes. You’ll learn to:

  • load a CSV file into a data frame
  • inspect a data frame, and pull out a column with $
  • summarise a column with mean(), sd() and summary()
  • plot data with plot() and hist()
  • write your own function

These are the skills the Week 1 exercises assume. Everything here uses base R: no packages needed.

The data are from the Met Office’s historic station data for Durham, © Crown copyright, reused under the Open Government Licence v3.0. See data/README.md for how they were prepared.

Next topic