Helper function to set up knitr options and hooks for the vdocs Rmarkdown template.

vdocs_knitr_setup(
  echo = TRUE,
  warning = FALSE,
  message = FALSE,
  cache = FALSE,
  collapse = TRUE,
  fig.align = "center",
  fig.pos = "H",
  fig.show = "hold",
  comment = "#>",
  ...
)

Arguments

echo

Logical indicating whether to display the source code in the output document.

warning

Logical indicating whether to display warnings in the output document.

message

Logical indicating whether to display messages in the output document.

cache

Logical indicating whether to cache code chunks.

collapse

Logical indicating whether to collapse all the source and output blocks from one code chunk into a single block.

fig.align

Alignment of figures in the output document. Possible values are "default", "left", "right", and "center".

fig.pos

Character string for the figure position arrangement to be used in `\beginfigure[]`.

fig.show

How to show/arrange the plots. Possible values are "asis", "hold", "animate", and "hide".

comment

Character string. Prefix to be added before each line of the text output.

...

Additional knitr options to set via `knitr::opts_chunk$set()`. See https://yihui.org/knitr/options/ for possible options.