Last active
June 20, 2025 16:21
-
-
Save thinkphp/905c2be6583964309eae5e552b6f1290 to your computer and use it in GitHub Desktop.
part 3. question 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#question 3: | |
completion_by_age <- traning_clean %>% | |
mutate( | |
age_bin = case_when( | |
age >= 18 & age <= 25 ~ "18-25", | |
age >= 26 & age <= 45 ~ "26-45", | |
age >= 46 & age <= 65 ~ "46-65" | |
) | |
) %>% | |
filter(!is.na(age_bin)) %>% | |
group_by(age_bin) %>% | |
summarise( | |
completion_rate = mean(program_status_clean == "Completed and Passed", na.rm = TRUE) * 100 | |
) | |
print(completion_by_age) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment