str_glue()

  • str_glue() = combine strings with {glue} syntax
  • vectorized
df |> mutate(greeting = str_glue("Hi {name}!"))
## # A tibble: 3 × 2
##   name  greeting 
##   <chr> <glue>   
## 1 Flora Hi Flora!
## 2 David Hi David!
## 3 <NA>  Hi NA!