morse provides functions to encode and decode with Morse code.
You can install the development version of morse like so:
# install.packages("devtools")
devtools::install_github("kunhtkun/morse")
To encode a string into Morse code words, use the function morse
:
library(morse)
input <- "hello!"
morse(input)
#> [1] "...././.-../.-../---/-.-.--"
To decode, use unmorse
:
library(morse)
input <- "hello!"
res <- morse(input)
unmorse(res)
#> [1] "hello!"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.