setSeed: Set the RNG Seed from within Rcpp

View source: R/RcppExports.R

setSeedR Documentation

Set the RNG Seed from within Rcpp

Description

Set the RNG Seed from within Rcpp

Usage

setSeed(seed)

Arguments

seed

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

Value

A set RNG scope.

Examples

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


corentin-dev/smmR documentation built on April 14, 2023, 11:36 p.m.