set_seed: Work around for unit tests using sample() among various...

Description Usage Arguments Details Value Examples

View source: R/set_seed.R

Description

The change in how 'set.seed' works in R 3.6 prompted the creation of this R version agnostic replacement to get unit test code to work on multiple versions of R in a Travis-CI build.

Usage

1
set_seed(seed = 1)

Arguments

seed

argument to set.seed

Details

It seems RNGkind(sample.kind="Rounding”) does not work prior to version 3.6 so I resorted to using version dependent construction of the argument list to set.seed() in do.call().

Value

NULL, invisibly.

Examples

1
2

rmsharp/nprcmanager documentation built on April 24, 2021, 3:13 p.m.