set_seed: Set the RNG Seed from within Rcpp

View source: R/RcppExports.R

set_seedR Documentation

Set the RNG Seed from within Rcpp

Description

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

Usage

set_seed(seed)

Arguments

seed

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

Value

A set RNG scope.

Examples

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

schoi355/gmwm documentation built on April 11, 2022, 1:21 a.m.