I\'m trying to teach myself R and in doing some sample problems I came across the need to reverse a string.
Here\'s what I\'ve tried so far but the paste operation d
You can also use the IRanges package.
IRanges
library(IRanges) x <- "ATGCSDS" reverse(x) # [1] "SDSCGTA"
You can also use the Biostrings package.
Biostrings
library(Biostrings) x <- "ATGCSDS" reverse(x) # [1] "SDSCGTA"