R/currentEngine.R

Defines functions setCurrentEngine getCurrentEngine

#' @keywords internal
getCurrentEngine <- function() {
  engine <- getOption("TRNGengine", default = get(defaultKind())$new())
  setCurrentEngine(engine)
  return(engine)
}

#' @keywords internal
setCurrentEngine <- function(engine) {
  # TODO: check class?
  options(TRNGengine = engine)
}

Try the rTRNG package in your browser

Any scripts or data that you put into this service are public.

rTRNG documentation built on March 18, 2022, 7:15 p.m.