rand_seed

0th

Percentile

An unevaluated expression to return .Random.seed if exists

This expression returns .Random.seed when eval(rand_seed) and NULL otherwise.

Keywords
datasets
Usage
rand_seed
Details

It is designed to work with opts_knit$set(cache.extra = rand_seed) for reproducibility of chunks that involve with random number generation. See references.

format

language { if (exists(".Random.seed", envir = globalenv())) ; get(".Random.seed", envir = globalenv()) }

References

http://yihui.name/knitr/demo/cache/

Aliases
  • rand_seed
Examples
eval(rand_seed)
rnorm(1)  # .Random.seed is created (or modified)
eval(rand_seed)
Documentation reproduced from package knitr, version 0.9, License: GPL

Community examples

Looks like there are no examples yet.