Applied statistics (BEM, GEO)
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:
- 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.
- Read the material in the course book [A] as stated below.
- Watch the video introduction-to-RStudio which gives a brief introduction to RStudio and how to get started with learning some R language.
- 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.
- 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.
- 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
- Rmarkdown intro
- Download Rmarkdown-example.Rmd and knit it.
- In the final part of the document try to insert your own code to answer the exercise and knit the document again.
- Penguin data visualisation
- Download penguin-data-visualisation.Rmd and knit it.
- Work through the exercises as described in the document and make your own report with visualisations of the penguin data.
- Penguin data wrangling
- Download penguin-data-wrangling.Rmd and knit it.
- Work through the exercises as described in the document and make your own report with investigations of the penguin data.