Back to Course

R for Busy People (Cohort-0)

0% Complete
0/0 Steps
  1. Installing R and RStudio
    1 Lesson
    |
    2 Quizzes
  2. The RStudio IDE
    1 Lesson
    |
    2 Quizzes
  3. Coding Basics
    1 Lesson
    |
    2 Quizzes
  4. Assignment | Workshop 1
    1 Quiz
  5. Data dive: Ebola in Sierra Leone
    1 Lesson
    |
    2 Quizzes
  6. RStudio Projects
    1 Lesson
    |
    2 Quizzes
  7. Workshop 2
    1 Lesson
    |
    1 Quiz
  8. Using R Markdown
    1 Lesson
    |
    2 Quizzes
  9. Data classes & structures (deprec)
    2 Lessons
  10. Workshop 3
    1 Lesson
    |
    1 Quiz
  11. Select & rename
    1 Lesson
    |
    3 Quizzes
  12. Filter
    1 Lesson
    |
    3 Quizzes
  13. Workshop 4
    1 Quiz
  14. Mutate
    1 Lesson
    |
    3 Quizzes
  15. Workshop 5
    1 Lesson
    |
    1 Quiz
  16. Conditional mutate
    1 Lesson
    |
    3 Quizzes
  17. Group by and summarize
    1 Lesson
    |
    2 Quizzes
  18. Workshop 6
    1 Lesson
    |
    1 Quiz
  19. Other grouped operations
    1 Lesson
    |
    2 Quizzes
  20. Workshop 7
    1 Lesson
    |
    1 Quiz
  21. Intro to ggplot2
    1 Lesson
    |
    2 Quizzes
  22. Scatter plots and smoothing
    1 Lesson
    |
    2 Quizzes
  23. Workshop 8
    1 Lesson
    |
    1 Quiz
  24. Lines, scales, and labels
    1 Lesson
    |
    2 Quizzes
  25. Overview of the EpiGraphHub web platform
  26. Data exploration on EpiGraphHub
    1 Quiz
  27. Workshop 9
    1 Lesson
    |
    1 Quiz
  28. Workshop 10
    1 Lesson
    |
    1 Quiz
  29. Final project
    1 Lesson
    |
    1 Quiz
  30. Getting help
    1 Lesson
    |
    1 Quiz
  31. Quiz contributions
    16 Lessons
Topic 14 of 31
In Progress

Mutate

🚗 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.

Subscribe
Notify of
guest

6 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Alhassane

Very good presentation

Christine

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)?

Joy

Hi Christine, When NA values are present, tabyl() also displays “valid” percentages, i.e., with missing values removed from the denominator.

Christine

Got it, that makes sense. Thanks Joy!

Snigdha

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 »

Joy

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 »

6
0
Questions or comments?x