I want to remove a specific letter from a string.
removing the first A works with str_remove(). But now I want to remove only the second and only the third A. Is there a function for that or any suggestions?
I would want to have these results:
GTGAGGA GTAGGGA GTAGAGG
Thanks a lot for any help!
x <- c("GTAGAGGA") str_remove(x, "A")
Here is one way:
which prints: