set_seed_if_necessary_helper: Helper function for setting a seed when necessary

set_seed_if_necessary_helperR Documentation

Helper function for setting a seed when necessary

Description

Helper function for setting a seed when necessary

Usage

set_seed_if_necessary_helper(
  set_rand_seed_at_creation_of_all_new_major_objects,
  location_string,
  forced_seed = NULL
)

Arguments

set_rand_seed_at_creation_of_all_new_major_objects

boolean indicating whether a new seed should be set every time an rsrun or rsproblem object is created

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

Value

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)


langfob/bdpg documentation built on Dec. 8, 2022, 5:33 a.m.