🚗 Video too fast or too slow? Click the gear icon ⚙️ at the bottom-right to change the speed!
Lesson code
Please download the zip folder below to code along with the instructor.
You need to unzip this folder to code along. Or “Extract All” on Windows. See our video explanation of this if you are unsure.
Lesson notes
The written guide below is an accompaniment to the lesson video. You may read through it if you prefer written tutorials to video content.
Very good presentation
for the data quiz, we were advised to use the adorn_pct_formatting() function. the table output shows a new col named “valid_percent”. what does this col refer to (as opposed to n percent)?
Hi Christine, When
NA
values are present,tabyl()
also displays “valid” percentages, i.e., with missing values removed from the denominator.Got it, that makes sense. Thanks Joy!
yao_bmi %>% mutate(bmi_integer = as.integer(bmi), I think there might be something wrong with this part of the code provided in the lesson. We dont define yao_BMI from yao dataset first. I tried to do it in the code with this, but it still didnt work: yao_bmi <- yao %>% select (bmi) %>% mutate(bmi_integer… Read more »
Hi Snigdha, yao_bmi is created in section 7, just before the practice question. yao_bmi <- yao %>% select(weight_kg, height_cm) %>% # first obtain the height in meters mutate(height_meters = height_cm/100) %>% # then use the BMI formula mutate(bmi = weight_kg / (height_meters)^2) Please make sure you have run all the code above the code… Read more »