Skip to content

Commit

Permalink
Merge pull request #249 from FredHutch/interactive
Browse files Browse the repository at this point in the history
Fix error running package-loading-and-options chunk interactively
  • Loading branch information
slager authored Jan 8, 2025
2 parents 4bdaa31 + 0d0b239 commit 8aacbf7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Bug fixes
* Provide default CRAN mirror if missing in install_load_cran_packages(), e.g., in a child R session during knitting. Fixes 'trying to use CRAN without setting a mirror' error (#218)
* Update template.tex so that flextable package can be used to create tables in PDF documents (#226)
* Clean up invalid ORCID placeholder generated by usethis 3.0.0 that threw error on R version 4.5.x (#248)
* Fix error when running skeleton.Rmd file interactively (#249)
* Include pdata object name and data package name in visc_load_pdata() error message (#252)

Other improvements
Expand Down
2 changes: 1 addition & 1 deletion inst/rmarkdown/templates/visc_empty/skeleton/skeleton.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ opts_chunk$set(cache = FALSE,
out.extra = "",
fig.pos = "H")
# fig.align argument is not supported in Word (align in template docx)
if (knitr::opts_knit$get('rmarkdown.pandoc.to') == 'latex'){
if (get_output_type() == 'latex'){
opts_chunk$set(fig.align = "center")
}
Expand Down
2 changes: 1 addition & 1 deletion inst/rmarkdown/templates/visc_report/skeleton/skeleton.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ opts_chunk$set(cache = FALSE,
out.extra = "",
fig.pos = "H")
# fig.align argument is not supported in Word (align in template docx)
if (knitr::opts_knit$get('rmarkdown.pandoc.to') == 'latex'){
if (get_output_type() == 'latex'){
opts_chunk$set(fig.align = "center")
}
Expand Down

0 comments on commit 8aacbf7

Please sign in to comment.