Skip to content

Commit

Permalink
Remove commented out code
Browse files Browse the repository at this point in the history
It's no longer necessary to copy over the random seed because we always evaluate in the global environment
  • Loading branch information
hadley committed May 1, 2024
1 parent d870e0a commit 9a6bbfc
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions R/rmarkdown.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,8 @@ rmarkdown_render_with_seed <- function(..., seed = NULL) {
if (requireNamespace("htmlwidgets", quietly = TRUE)) {
htmlwidgets::setWidgetIdSeed(seed)
}

# since envir is copied from the parent fn into callr::r_safe(),
# set.seed() sets the seed in the wrong global env and we have to
# manually copy it over
# if (!identical(envir, globalenv())) {
# envir$.Random.seed <- .GlobalEnv$.Random.seed
# }
}

# Ensure paths from output are not made relative to input
# https://github.com/yihui/knitr/issues/2171
options(knitr.graphics.rel_path = FALSE)
Expand Down

0 comments on commit 9a6bbfc

Please sign in to comment.