Highlights of the Knitr Package
summary
Knitr adds a multiline chunk‑option syntax using #| chunk‑option comments (YAML form supported and convert_chunk_header() available), option reuse via opts.label and ref.label (use I() to copy both options and code), and a file option to read one or more external scripts as the chunk body. New engines include comment, verbatim (with lang for syntax highlighting), embed, and exec — exec writes the chunk to a temp file and runs an arbitrary command with engine.opts for extra args.
AI-written summary · about
chapters (10)
- 0:00Start
- 3:23I. Write chunk options in chunk body
- 6:12Convert the old syntax to new syntax
- 6:34Reuse chunk options and/or content from other chunks
- 8:27Reuse both chunk options & content
- 9:20Quick tips
- 12:18New engines in knitr
- 14:53The embed engine to embed external files and display their content verbatim.
- 16:01The exec engine to execute an arbitrary system command on a file that contains the content of the chunk. The command is specified via the chunk option command, e.g..
- 19:00Recap
related talks
20mHighlights of the Knitr Package
10mHow to write a report using R Markdown
05mCode Samples That Compile Even More Easily
34mCode the Docs: Interactive Document Environments
30mMonday Lightning Talks
12mFrom summarizing projects to setting tags, uses of parsing R files
28mCode the Docs: Interactive Document Environments
19mReproducible, dynamic, and elegant books with Quarto
