Thanks to visit codestin.com
Credit goes to github.com

Skip to content

AmsterdamUMC/R-course-homework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

R Take-Home Assignments

These take-home assignments are designed both as practice material and a long-term support resource. Many researchers experience that the skills learned in an R course fade quickly without repeated use. Each exercise is therefore written both as a learning task now and as a self-guided refresher later.

The assignments include story-driven introductions, guided hints, and structured solutions so you can return to them whenever you need to analyse your own data.

You will also receive separate answer documents. We strongly recommend you first complete the assignments yourself and only consult the answers afterwards or if you are really stuck. Treat the answer key as a check and learning aid, not a shortcut.


Learning vision

The goal of this material is to help you build lasting confidence in R. By working through the assignments step by step, you will:

  • Strengthen your understanding of core R syntax and data structures.
  • Learn to read, clean, visualise, and interpret real-world data.
  • Develop reproducible habits using RMarkdown for transparent analysis.
  • Gain a first introduction to statistical reasoning in R through guided examples.

All materials are organised in two top-level folders:

  • Exercises/ – student versions of all assignments (with hints in code blocks)
  • Answers/ – corresponding instructor/solution versions (same text, filled-in code)

Each folder contains:

  • Individual .Rmd files (to open and edit in RStudio)
  • Pre-rendered PDFs (all_exercises.pdf / all_answers.pdf)
  • A front page explaining how to use the materials

Getting started: RMarkdown tutorial

If you’ve never worked with RMarkdown (.Rmd) files before, start with the short tutorial included in the repository:

  • Exercises/RMarkdown_basics.Rmd

or its pdf version:

  • Exercises/RMarkdown_basics.pdf

This mini tutorial explains what RMarkdown is, how to open it in RStudio, how to “knit” the file into a report (HTML or PDF), and why this format is used for the assignments. It takes about 10 minutes to complete and will help you understand the format before beginning Assignment 1.


How to use

You can work with these assignments in two ways:

  1. Using Git — clone the repository:

    git clone https://github.com/AmsterdamUMC/R-course-homework.git

  2. Without Git — download the latest ZIP bundles from the
    Releases page and unzip them locally.

Then open any .Rmd file in RStudio, fill in the missing code where the comments indicate tasks, and click Knit to create your own PDF (the tutorial tells you how).


What you will learn

Across five assignments, you will learn about the following topics:

  1. Introduction & patient data: reading, wrangling, plotting
  2. Penguins: exploratory data analysis and visualisation
  3. COVID: loops, conditionals, moving averages, flags
  4. World development – exploring GDP, life expectancy, and CO₂ emissions
  5. Statistics with penguins: intro to t-tests, ANOVA, effect sizes, diagnostics

Assignment 5 is intentionally a bit more in-depth to provide a gentle introduction to statistics in R.


Tips for students

  • Use the .Rmd versions for hands-on work.

  • The PDFs are great as quick references.

  • The answers are for review only > try the exercises first!

  • If you’re new to RMarkdown, complete the tutorial first.

  • For help in R, use:

    ?drop_na
    ??"linear model"
    example(lm)
    

License

This project is licensed under the Apache License 2.0. You are free to use, modify, and distribute these materials for educational and research purposes, provided that proper attribution is given and the same license is included in derivative works. See the LICENSE file for details.


✉️ Contact

Questions or feedback? Please open an issue on this repository.

About

The homework and syllabus for the carpentries R course of the Amsterdam UMC, VU, and UvA

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •