Normally we set up the global options once in the first code chunk in a
document using opts_chunk$set()
, so that all latter chunks will
use these options. Note the global options set in one chunk will not affect
the options in this chunk itself, and that is why we often need to set global
options in a separate chunk.
See str(knitr::opts_chunk$get())
for a list of default chunk options.