make_code_table: Make a hash table for code.

View source: R/morse.R

make_code_tableR Documentation

Make a hash table for code.

Description

Make a hash table for code.

Usage

make_code_table(code, from = 1, to = 2)

Arguments

code

Mapping from characters to code words. Each element is a vector of two strings.

from

Index of the character in the element of code.

to

Index of the code word in the element of code.

Value

The hash table for code.

Examples

morse:::make_code_table(list(c("a", "1"), c("b", "2")))
morse:::make_code_table(list(c("a", "1"), c("b", "2")), from = 2, to = 1)

kunhtkun/morse documentation built on March 17, 2022, 5:17 p.m.