It would be helpful to have a function that shows the difference between two strings, as:
x <- "a sample, etc"
y <- "a sample etc"
str_diff <- function(x,y){
setdiff(stringr::str_split(x[[1]], "")[[1]],
str_split(y[[1]], "")[[1]]
)
}
str_diff(x,y)
> str_diff(x,y)
[1] ","