morse_to_text: Convert Morse characters back to text

Description Usage Arguments Value Examples

View source: R/morse.R

Description

Convert Morse characters back to text

Usage

1

Arguments

morse

String with Morse characters separated by spaces. Must use . and - as dots and bars.

Value

A string of letters from whatever valid Morse code it can find in the input. It's fault tolerant - it will ignore bad Morse code.

Examples

1
2
3
4
text_to_morse_chars("Hello how are you") %>% morse_to_text()
# This is fault tolerant of bad Morse code:
morse <-  ".... . ..-.. .-AA.. ---"
morse_to_text(morse)

xmarquez/morsecode documentation built on Jan. 23, 2022, 12:47 p.m.