I'm trying to replace some numbers (from 1 to 15) with a string value but it's not doing it correctly. Here's my code :
before = c("1","11","2","22")
after = c("A","B","c","E")
phrase = list( c("1","11") , c("2","22") )
for (i in phrase){
r = stringi::stri_replace_all_fixed(
i ,
before,
after,
vectorize_all = FALSE)
print(r)
}
here's what I'm getting
[1] "A" "AA"
[1] "c" "cc"
how do I correct this?