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 16 of 31
In Progress

Conditional 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

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

Very good presentation! 😊

Axel

Hello everyone. I would ask a clarification about my code. I have met challenges when I want to execute the code related on pratice 1 and pratice 5. Code pratice 1 : {r eval = FALSE} # Enter your answer as a WHOLE number without quotes: Q_age_group_percentage <-   flu_linelist %>%   mutate(age_group = case_when(age… Read more »

Joy

Hi Axel, for the first question, you are assigning the entire table to the object “Q_age_group_percentage”. You should generate the table by itself, and then assign only the desired number to the object. For example, if your answer is 61, then you can put “Q_age_group_percentage <- 61″

Axel

Dear Joy, your answer isn’t clear. can you explain more on it?

Joy

For practice question 5, you’re quite close to the correct answer. It looks like you are missing the word “to” in “Recruit to Jiangsu study” and “Recruit to Zhejiang study”. If you fix those two text strings, you should get the correct answer.

Axel

for this,it’s ok. I have modified it. Thank you.

Ngwa

Thank you for the lesson

7
0
Questions or comments?x