Day 1

Published

November 2, 2023

🎯 Aim

Learning objectives
  • Setting up your data project (R project, folder structure)
  • Reading data into R (csv and xlsx)
  • The basics of R programming (atomic vectors, lists, data.frame, subsetting R objects)
  • Troubleshooting and producing minimal reproducible examples with reprex
  • Compute numerical summaries
  • Be familiar with computing density, distribution quantile and random generation of some parametric distributions

🕙 Schedule

Note

Please note this is an indicative schedule only!

Time Content
10.00-10.15 Introduction
10.15-10.45 Basics of R programming
10.45-11.00 Your turn (Exercise 1)
11.00-11.15 Setting up your data project
11.15-11.30 Computing numerical summaries and parametric distributions
11.30-12.00 Your turn (Exercise 2-3)

📑 Resources

  • Learn R Chapter 1: Getting started with R & RStudio
  • Learn R Chapter 2: R programming basics
  • Learn R Chapter 3: Troubleshooting and asking for help
  • Learn R Chapter 4: Project structure and importing data

🏋️‍♀️ Exercises

Exercise 1

Go through the exercises in Learn R Chapter 2: R programming basics (you can skip the Matrices section).

Exercise 2

The following are all the datasets for this training workshop. Download these and try to read this into R.

Exercise 3

The following exercise is written by Dr. Terry Neeman with slight modifications.

We will look at the penguins dataset that is contained in the palmerpenguins package. For more details about the data, see here.

library(palmerpenguins)
data(penguins)

Using this data, answer the following questions.

  1. Produce a numerical summary of the data.
  2. How many species were studied?
  3. How many islands are there in the data?
  4. Did they find all species on every island?
  5. For each biometric measure, are there difference between the species?
  6. Explore the associations between the biometric measurements bill length, bill depth, flipper length and body mass.
  7. Are there differences in these associations between species?

This website is brought to you by the ANU Biological Data Science Institute.