set_seed: Set the RNG Seed from within Rcpp

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

Within Rcpp, one can set the R session seed without triggering the CRAN rng modifier check.

Usage

1
set_seed(seed)

Arguments

seed

A unsigned int that is the seed one wishes to use.

Value

A set RNG scope.

Examples

1
2
3
4
5
set.seed(10)
x = rnorm(5,0,1)
set_seed(10)
y = rnorm(5,0,1)
all.equal(x,y, check.attributes = FALSE)

SMAC-Group/gmwm documentation built on Sept. 11, 2021, 10:06 a.m.