I tried
> str_replace("abcdef", c("b", "d"), c(b="B", d="D"))
[1] "aBcdef""abcDef"
hoping for
[1] "aBcDef"
How can we replace each pattern with a specific replacement with one function call to stringr::str_replace
?
I tried
> str_replace("abcdef", c("b", "d"), c(b="B", d="D"))
[1] "aBcdef""abcDef"
hoping for
[1] "aBcDef"
How can we replace each pattern with a specific replacement with one function call to stringr::str_replace
?