Adding back an NA, closes #1273

This commit is contained in:
mine-cetinkaya-rundel 2023-02-24 00:18:33 -05:00
parent 9ee09e9441
commit 661b0a5339
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@
```{r}
#| results: "asis"
#| echo: false
source("_common.R")
status("complete")
```
@ -166,7 +167,7 @@ str_c("Hello ", c("John", "Susan"))
`str_c()` is very similar to the base `paste0()`, but is designed to be used with `mutate()` by obeying the usual tidyverse rules for recycling and propagating missing values:
```{r}
df <- tibble(name = c("Flora", "David", "Terra"))
df <- tibble(name = c("Flora", "David", "Terra", NA))
df |> mutate(greeting = str_c("Hi ", name, "!"))
```