Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8.8: Add a comment on why it's a silly example and a comment on what would happen in this code #88

Open
signekb opened this issue May 8, 2024 · 0 comments

Comments

@signekb
Copy link
Member

signekb commented May 8, 2024

Description

I think that it would be nice with a comment on the code to explicitly state why it's "silly"

used then by default, the final output would be a missing value. A
(silly) example using age might be:
```{r}
#| eval: false
case_when(
age > 20 ~ "old",
age <= 20 ~ "young",
# For final condition
TRUE ~ "unborn!"
)
```
If instead you want one of the conditions to be `NA`, you need to set
the appropriate `NA` value:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant