I am running a function with random factor in R, and I realized that I forgot to run set.seed()
before running this function.
Is there a way I can retrieve the seed
value R is using (I suppose it will be an arbitrary number, but doesn't matter) so I can reproduce the execution?
You can get the current random state using .Random.seed
. However, you'd need the previous state for reproducing your results and it's not possible to get that.
(Well, the Mersenne Twister is not cryptographically secure, so maybe it could be possible, but certainly not practical.)
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