From reproducible package, set.randomseed()
Convenient function for applying a random seed. Usually used with
on.exit()
when a specified seed is applied so that non-random operations
do not interfere with other aspects of a user's work. May also be called with
set.seed = TRUE
to simply return a random seed to use, without actually
having applied it.