
Convert any character vector to an integer for setting a reproducible seed
Source:R/set.char.seed.R
set.char.seed.Rd
set.char.seed()
converts a character vector into an integer used as reproducible
seed
Details
Each letter and number in the character vector is assigned a specific number. These numbers are concatenated and divided by 2^30 - 1, and the remainder of this division is used as the numeric reproducible seed.
If you get a warning about 'loss of accuracy", consider using a more succinct character vector, otherwise you will get a seed of 0.