Skip to content

Commit

Permalink
use eval.expr = TRUE to enable evaluating R expressions (cf rstudio/r…
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Jun 28, 2018
1 parent 2b3e617 commit 9d931d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: knitr
Type: Package
Title: A General-Purpose Package for Dynamic Report Generation in R
Version: 1.20.6
Version: 1.20.7
Authors@R: c(
person("Yihui", "Xie", role = c("aut", "cre"), email = "[email protected]", comment = c(ORCID = "0000-0003-0645-5666")),
person("Adam", "Vogt", role = "ctb"),
Expand Down Expand Up @@ -103,7 +103,7 @@ Imports:
highr,
markdown,
stringr (>= 0.6),
yaml,
yaml (>= 2.1.19),
methods,
tools
Suggests:
Expand Down
4 changes: 3 additions & 1 deletion R/params.R
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ knit_params = function(text, evaluate = TRUE) {
#' @export
knit_params_yaml = function(yaml, evaluate = TRUE) {
# parse the yaml using our handlers
parsed_yaml = yaml::yaml.load(yaml, handlers = knit_params_handlers(evaluate = evaluate))
parsed_yaml = yaml::yaml.load(
yaml, handlers = knit_params_handlers(evaluate = evaluate), eval.expr = TRUE
)

# if we found paramters then resolve and return them
if (is.list(parsed_yaml) && !is.null(parsed_yaml$params)) {
Expand Down

0 comments on commit 9d931d4

Please sign in to comment.