-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Intermediate-R/docs/3.function_conditions.md
Line 224 in e20cfba
| fridge <- c("cheese", fridge, "milk") |
fridge should not be in fridge vector.
possible suggested change (murrays example in workshop, needs testing again):
fridge <- c("cheese", "milk", "banana", "apple", "carrot")
dairy <- c("cheese", "yoghurt","milk")
vegetable <- c("carrot", "potato")
case_when(
fridge %in% dairy ~ str_c(fridge, " is dairy"),
fridge %in% vegetable ~ str_c(fridge, " is a vegetable"),
fridge %in% fruit ~ str_c(fridge, " is a fruit"),
.default = str_glue("You don't even like {fridge}!")
)
Metadata
Metadata
Assignees
Labels
No labels