I understand what set.seed()
does and when I might use it, but I still have many questions about the function. Here are a few:
set.seed()
to something "more random" if you have called set.seed()
earlier in your session? Is that even necessary?set.seed()
allow alphanumeric seeds, the way one can enter them at random.org (be sure you are in the advanced mode, and see "Part 3" of the form to see what I mean)?Just for fun:
set.seed.alpha <- function(x) { require("digest") hexval <- paste0("0x",digest(x,"crc32")) intval <- type.convert(hexval) %% .Machine$integer.max set.seed(intval) }
So you can do:
set.seed.alpha("hello world")
(in fact x
can be any R object, not just an alphanumeric string)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With