Quarto code block options

Author

Richard J Telford

Published

16 October 2022

Block options

Code block options control how the blocks work and how any output is treated. Options are given in special comments at the top of the block.

There are lots of block options, but only a few that you will need to use frequently. Here are some and their default.

  • echo (true) Show the block’s code in the output.
  • eval (true) Run the block’s code.
  • include (true) Include the output of the block in the document.
  • message (true) Include messages from R.
  • warning (true) Include warnings from R.
  • output (true) How and whether to include results.

Some of these block options interact. Use the following widget, which initially shows the defaults, to explore what is shown with the most commonly used options.

Select your block options

Block output