randomSeeds: saveSeed

randomSeedsR Documentation

saveSeed

Description

Functions to save and restore seeds for random number generators

Usage

saveSeed()

restoreSeed(oldseed)

Arguments

oldSeed

a seed to be restored, or NULL if the seed hadn't been set

Details

If easyPlot is called without minimum and maximum x or y co-ordinates, the functions for the art object are run twice. The first time generates the co-ordinates to be used when plotted for real a second time. To ensure random variables return the same result both times, the seed for random variables is saved before the first run and reset for the second run.

Value

saveSeed returns the current seed or NULL if not set. restoreSeed doesn't return anything.

Examples

print(1+1)

R-graphic-design/RGD documentation built on Jan. 2, 2023, 10:30 p.m.