always_set_new_or_forced_rand_seed | R Documentation |
Generate a new seed based on the current time if the forced_seed argument is NULL. If that argument is not NULL, then use it as a seed. Regardless of which way the seed is derived, call set.seed() with it as the argument.
always_set_new_or_forced_rand_seed(location_string, forced_seed = NULL)
location_string |
string to indicate where this function was called, e.g., at the start of the creation of an rsproblem |
forced_seed |
integer to use as seed in set.seed() call or NULL to indicate that no seed has been provided |
Returns a 2 element named list with element new_seed containing the new integer seed value or NA and the element R_internal_seed_array containing the array value .Random.seed at the end of this function (i.e., the internal state of R's random number generator)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.