Applied statistics (CPH: BD)

Frontpage Lecture plan Vidcasts Datasets R install help

Introduction to R, RStudio, and statistics

Preparation

To prepare for the first lecture of the course please follow these points in prioritized order:

  1. This step is essential to benefit from the firste lecture: Please install R and R-studio before the first lecture. The Installation guide provides the necessary information.
  2. Read the material in the course book [A] as stated below.
  3. Watch the video introduction-to-RStudio which gives a brief introduction to RStudio and how to get started with learning some R language.
  4. If you have problems with getting this part to work please jump to the tutorial below. Download the file Rmarkdown-example.Rmd and see if you are able to open and knit the file as described in the video. Note that you probably need to install some packages before you can knit the document (this is described in the document file and in the introduction video). Once you have pressed knit (just above the file when it is open in RStudio) you should see a new window with the resulting document. Go through the document, and try to change a few things in the file as instructed at the end and press knit again.
  5. Go through the tutorial (in Danish) at http://apps.math.aau.dk/asta/R-intro/. If the server is slow or doesn't work you can try to download and run the file R-intro-tutorial.Rmd. NOTE: You need to install the package learnr before it will work. If everything is setup correctly you can press the green play button "Run document" above the open document in RStudio and it wil open a new page with the tutorial. When you run it on your own computer you can still go through the exercises, but it doesn't tell you whether the answers are correct.
  6. Optionally Try the more involved tutorial http://apps.math.aau.dk/asta/R-objects/ online or download and run the file R-objects-tutorial.Rmd.

Literature

[A] chapter 1-3. Descriptive statistics. The lecture focuses on chapter 2.1, 2.2 and all of chapter 3. The rest is left for independent studies.

Lecture material

This lecture as: slideshow (html), Rmarkdown (Rmd), notes (pdf).

Exercises

  1. Rmarkdown intro
  1. Penguin data visualisation
  1. Penguin data wrangling