`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)
s | a non-empty string representing a generator |
---|
the corresponding generator number
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.
char2num("abd")#> [1] 11char2num("Addb")#> [1] 11