Skip to content

Commit

Permalink
Export local_seed
Browse files Browse the repository at this point in the history
Fixes #153
  • Loading branch information
jimhester committed Oct 20, 2020
1 parent 1f63e10 commit 5825def
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export(local_png)
export(local_postscript)
export(local_preserve_seed)
export(local_rng_version)
export(local_seed)
export(local_svg)
export(local_temp_libpaths)
export(local_tempdir)
Expand Down
1 change: 1 addition & 0 deletions R/seed.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ with_seed <- function(seed, code) {
}

#' @rdname with_seed
#' @export
local_seed <- function(seed, .local_envir = parent.frame()) {
old_seed <- get_seed()
set.seed(seed)
Expand Down

0 comments on commit 5825def

Please sign in to comment.