2.2 Quarto options
Open the slides in a new tab here.
Exercises
- Download this quarto document with some
{gtsummary}
tables from yesterday. - Render the document and examine it. For this first set of exercises, don’t make any changes to the code, only the options.
- I don’t like seeing the output from the first chunk, where the packages are loaded. Use an option that makes it so that we don’t see this chunk’s output.
- Let’s not print the code from creating the tables. Using an option for the whole document, make it so that we don’t see the code from any of the chunks.
- Play around with themes!
Exercises part 2
- Create an new chunk and paste in this code:
tbl_summary(
NLSY,
by = sex_cat,
include = c(sex_cat, race_eth_cat, region_cat,
eyesight_cat, glasses, age_bir))
Try to render it. There’s an error in the code! Play around with eval:
and error:
chunk and document options to help you b) render the document despite the error and b) find the error. Then fix the error and re-render. 5. Add some text about the data (you can copy and paste from the website) to the document above the code chunks.
Resources
- The quarto website is an amazing resource
- Feel free to look at the source code of this site
Additional resources for R Markdown will have a lot of overlap: