R/seed_stream.R

Defines functions seed_stream

seed_stream <- function(seed_stream_start, length.out) {
  # Initialize vector
  stream <- rep(NA_integer_, length.out)

  # Loop over vector to get
  for (i1 in 1:length.out) {
    seed_stream_start <- parallel::nextRNGStream(seed_stream_start)
    stream[i1] <- paste0(seed_stream_start, collapse = "_")
  }

  return(stream)
}

Try the imabc package in your browser

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

imabc documentation built on April 12, 2021, 9:06 a.m.