Replace last comma in character with " &"

We can also use str_locate_all with str_sub:

library(stringr)
pos <- str_locate_all(x, ',')[[1]][2, ]
str_sub(x, pos[1], pos[2]) <- " &"

# [1] "char1, char2 & char3"

One option is stri_replace_last from stringi

library(stringi)
stri_replace_last(x, fixed = ',', ' &')
#[1] "char1, char2 & char3"

You could split and unsplit it.

u <- unlist(strsplit(x, ""))
u[tail(grep(",", u), 1)] <- " &"
paste0(u, collapse="")
# [1] "char1, char2 & char3"

You can use sub :

sub(",([^,]*)$"," &\\1", x)
# [1] "char1, char2 & char3"