| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/cache.R |
| 3 |
\docType{data} |
| 4 |
\name{rand_seed} |
| 5 |
\alias{rand_seed} |
| 6 |
\title{An unevaluated expression to return .Random.seed if exists} |
| 7 |
\usage{ |
| 8 |
rand_seed |
| 9 |
} |
| 10 |
\description{ |
| 11 |
This expression returns \code{.Random.seed} when \code{eval(rand_seed)} and |
| 12 |
\code{NULL} otherwise. |
| 13 |
} |
| 14 |
\details{ |
| 15 |
It is designed to work with \code{opts_chunk$set(cache.extra = rand_seed)} |
| 16 |
for reproducibility of chunks that involve with random number generation. See |
| 17 |
references. |
| 18 |
} |
| 19 |
\examples{ |
| 20 |
eval(rand_seed) |
| 21 |
rnorm(1) # .Random.seed is created (or modified) |
| 22 |
eval(rand_seed) |
| 23 |
} |
| 24 |
\references{ |
| 25 |
\url{https://yihui.org/knitr/demo/cache/} |
| 26 |
} |
| 27 |
\keyword{datasets} |