Set seed and store a seed which can be used to reset the random number generator
swap_seed(new_seed)
integer. The new seed that is to be set. In case this is
parameter is missing, no changes are made and the function just returns
NULL
. This is useful because a function can just pass on its own seed
argument and therefore control whether the seed shall be fixed or left
as-is.
The generated seed is returned if it exists. Otherwise NULL
. In case that
new_seed
was missing, NULL
is returned.