knitr
Dynamic report generation in R combining code, results and prose
knitr adds OpenTelemetry tracing, turning document builds into observable pipelines
◆Recent moves
- 7mo ago
OpenTelemetry tracing and before/after-knit hooks
⚡ SPARKThe first release in this window to add capability rather than conform to someone else's: knit operations now emit OpenTelemetry spans per document and per chunk when otel and otelsdk are installed, and knitting gained before and after lifecycle hooks. Both land squarely on the extensibility thread that has been building since chunk hooks gained a dots argument.
View source ↗ - 1y ago
Inline-expression line numbers in error messages
Error reporting gets specific: failures in inline code now name the inline expression's own line rather than the enclosing chunk's range, and vignette failures under R CMD build print a traceback. The offloading thread continues, with combine_words() and write_bib() reimplemented in xfun.
View source ↗ - 1y ago
Stricter chunk fences, alt text for LaTeX figures
Mostly conformance work - unbalanced chunk fences are prohibited outright now, and fig.alt finally reaches LaTeX output through the includegraphics alt attribute. Letting chunks evaluate in a custom environment passed to knit_global() is the one piece of genuinely new surface.
View source ↗ - 2y ago
Fixes collapse=TRUE regression and a purl() path leak
Two bug fixes: the collapse = TRUE regression from 1.46 that stopped merging code and multi-output results into one block, and hook_purl() writing the script path into the output document.
View source ↗ - 2y ago
kable() gains a global row cap; write_bib escapes ampersands
Guardrails rather than features - knitr.kable.max_rows stops kable() from accidentally rendering an enormous table from a large object, and write_bib() escapes ampersands throughout the bibliography instead of only in the title field.
View source ↗ - 2y ago
spin() accepts percent and pipe chunk delimiters
Broadens how a plain R script can be treated as a document: spin() recognizes both the percent-percent and pipe-comment delimiters used by notebook tooling elsewhere. Chunk hooks accepting a dots argument is the early move in the extensibility thread that 1.51 later builds on.
View source ↗