R/rot13.R

Defines functions rot13

Documented in rot13

rot13 <- function(string){
    if(!is.character(string)) stop("character string expected")
    old <- c2s(c(letters, LETTERS))
    new <- c2s(c(letters[14:26], letters[1:13], LETTERS[14:26], LETTERS[1:13]))
    chartr(old = old, new = new, x = string)
}

Try the seqinr package in your browser

Any scripts or data that you put into this service are public.

seqinr documentation built on May 29, 2024, 6:36 a.m.