2. Workflow basics¶
Learning outcomes
- I am comfortable with the second chapter of R for Data Science
- I can recommend the
swirlpackage to the right person - I can assign a value to a variable
- I can use snake case when naming a variable
- I can write a comment
- I can correct typos in simple code
For teachers
Teaching goals are:
- Learners have read part the second chapter of R for Data Science
Prior question:
- What is R?
- What is RStudio?
- What is a variable?
- What is an assignment?
- What is an assignment operator?
- How does it look like?
- What is a comment?
- Why use a comment?
- What is meant with 'snake case'?
Feedback questions:
- What is a variable?
- Why use a comment?
- What is meant with 'snake case'?
- Why use variable names with snake case?
Why basic R is important¶

Basic R applies to all programming in R.
Exercises¶
Exercise 1: Chapter 2¶
- Read R for data science, chapter 2 until the exercises of 2.5.
- Do these exercises
(Optional) Exercise 2: swirl¶
swirl is an R package to teach R.
The goal of this exercise is to see how useful it may be to you.
- Install the
swirlR package
Answer
install.packages("swirl")
- Load the `swirl package
Answer
library(swirl)
This will show:
| Hi! Type swirl() when you are ready to begin.
- Start the `swirl package. Tip: you've gotten a hint in the previous step
Answer
swirl()
- Give your name
- Pick the
R Programmingcourse - Pick the
1: Basic Building Blockslesson - Do 1 exercise, so you know how
swirlbehaves: the goal is to know whether to recommend/useswirl.