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_chunk$set(cache.extra = rand_seed) for reproducibility of chunks that involve with random number generation. See references.

References

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

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

Community examples

Looks like there are no examples yet.