`char2num` takes a non-empty string, representing a generator, and converts it to the equivalent generator number. In the string, each letter represents a basic factor.

char2num(s)

Arguments

s

a non-empty string representing a generator

Value

the corresponding generator number

Details

All letters are converted to lower case to avoid confusion with upper case letters, representing four-level factors. The order of the letters does not matter. Any letter is only counted once in the word. Thus, `char2num("abcd")` and `char2num("abbcddd")` will output the same result.

Examples

char2num("abd")
#> [1] 11
char2num("Addb")
#> [1] 11