From http://robjhyndman.com/talks/MelbourneRUGexamples.R