set.char.seed {despair} | R Documentation |
Convert any character vector to an integer for setting a reproducible seed
Description
set.char.seed()
converts a character vector into an integer used as reproducible
seed
Usage
set.char.seed(char)
Arguments
char |
a character vector |
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.
Value
set.char.seed()
takes a character vector and returns a reproducible seed.
Author(s)
JP Monteagudo
Examples
set.char.seed("The Sticky Chicken")
set.char.seed("lanky tadpole")
set.char.seed("Manny said what?")
[Package despair version 0.1.1 Index]