A code chunk where results are printed:
x <- "foo"
y <- "bar"
x
y
Used to be rended (in rmarkdown, reprex) as a single code chunk:
x <- "foo"
y <- "bar"
x
#> [1] "foo"
y
#> [1] "bar"
Recently (since a month or two), this is rendered as two code chunks:
x <- "foo"
y <- "bar"
x
#> [1] "foo"
y
#> [1] "bar"
I noticed the change when using devtools::build_readme()
, but it is now also the default in reprex, rmarkdown. It is not used by roxygen when rendering the examples of a function (that remains a single code block).
What has triggered this change (a knitr update) and why? Is there a knitr option to revert it? Note that knitr collapse = TRUE
(default when creating a vignette) does not affect this.
Thanks!