Skip to content

knitr

1.52

A General-Purpose Package for Dynamic Report Generation in R

486packages dependsuggested by 11,505
14.8Mdownloads / year
41.6%test coverage
13/13flavors OK

Overview

About

Provides a general-purpose tool for dynamic report generation in R using Literate Programming techniques.

Install

Health

CRAN checks
13OK
Slowest check: 3.4 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • ERROR12 OK, 1 ERROR2026-07-29
  • OK13 OK2026-07-11
  • ERROR12 OK, 1 ERROR2026-07-10
Show 5 earlier changesHide 5 earlier changes
  • OK13 OK2026-07-01
  • ERROR12 OK, 1 ERROR2026-06-29
  • OK13 OK2026-06-09
  • ERROR12 OK, 1 ERROR2026-06-08
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.52
README· In the repository, left out of the releaseVignettesYes · 9 · dynamicNEWSYes · does not mention 1.52Citation fileYes · cites a publicationWebsiteYes
Help pages
76 (2 internal)includes a package overview page
Examples that run
84%42 run in a plain check (1 of them under a condition) · 1 never run · 7 hold no code
Exported functions with examples
66%
Documented parameters
89%
Return-value docs
64%
Help pages citing references
43%

Downloads

14.8M
CRAN downloads in the past year
Rank #42 · ~40.5K/day · ~1.2M/mo
Daily download trend is not available in this view yet.
1.2M30 days
3.5M90 days
14.8M1 year
Compare downloads with other packages →
Also on274.7K r2u127 autocran1.5M conda_forge361 bioconda22.3K c2d4u

Repository

2,469Stars
876Forks
2Open issues
2Open PRs
66Releases
6,573Commits
199Commit identities
knitrrliterate-programmingsweavermarkdowndynamic-documentsr-package
6,573 commits · Last activity 2026-10-12 · +0.1% stars, 30d · Default branch at 1.52.4, ahead of CRAN 1.52 (checked 2026-10-11)
Responsiveness
How these are sampled
PRs merged (all time)
80%
Median days to close, 50 most recently updated closed issues
1,538
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-10-16 · 2,4182026-10-12 · 2,469
PracticesBeta

12 development-tooling and community-health practices detected across 8 families in the upstream repository

Checks run against github.com/yihui/knitr on 2026-10-11.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (4)
Contributing guideIssue templatesFunding

Funding links: GitHub Sponsors

The repository owner accepts GitHub Sponsors

Docs source (1)

GitHub Pages site last deployed 2026-10-01

Coverage (1)
Coverage reporting (Codecov)
Show all practicesHide 4 practices
Reproducibility and dev environment (1)
Makefile
Automation and maintenance (1)
Dependabot
Lint, format, editor (1)
RStudio project
Git structural (1)
.gitattributes
How this is detected·Detection ruleset v3 (2026-09-26)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • GitHub Copilotfirst seen 2026-03-20
    Seen in the repository: .github/copilot-instructions.md, .github/workflows/copilot-setup-steps.yml
    Pull request: opened by its own account
    Commits: 4 by its own account · at least 4 crediting it in the message
  • Claude Codefirst seen 2026-05-20
    Pull request it wrote: opened by a project member
    Commits: at least 69 crediting it in the message
Models named in its commits
  • Claude Opus 4.864 commits · Aug to Sep 2026
  • Claude Opus 4.64 commits · May 2026
  • Claude Sonnet 4.51 commit · Aug 2026
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
34 external dependencies (excludes base and recommended)

Installing knitr adds 4 packages (2 with compiled code, 381 KB of source tarballs). Heaviest: xfun 224 KB, yaml 106 KB, evaluate 38 KB.

Depends (1)
R >= 3.6.0
Imports (6)
LinkingTo (0)
none
Enhances (0)
none

People & History

People (109)
Author, Maintainer since 0.1 (2012)
https://yihui.org
Contributor
the Sweavel package at inst/misc/Sweavel.sty
Contributor · added in 1.17
Contributor · added in 1.40
Contributor · added in 1.9
Contributor · added in 0.8
Contributor · added in 0.5
Contributor, Copyright holder · added in 1.9
the CSS file at inst/misc/docco-classic.css
Contributor · added in 1.9
Show 99 more contributorsHide 99 contributors
Contributor · added in 1.11
Contributor · added in 1.9
Contributor · added in 1.11
Contributor · added in 1.9
Contributor · added in 0.7
Contributor · added in 1.40
Contributor · added in 1.12
Contributor · added in 1.3
Contributor · added in 1.19
Contributor · added in 1.7
Contributor · added in 1.0.5
Contributor · added in 1.18
Contributor · added in 0.5
Contributor · added in 1.18
Contributor · added in 1.40
Contributor · added in 1.3
Contributor · added in 1.16
Contributor · added in 1.3
Contributor · added in 1.18
Contributor · added in 1.9
Contributor · added in 3.0.1
Contributor · added in 1.16
Contributor · added in 1.41
Contributor · added in 1.16
Contributor · added in 1.10
Contributor · added in 1.5
Contributor · added in 1.6
Contributor · added in 1.21
Contributor · added in 1.31
Contributor · added in 1.25
Contributor · added in 1.10
Contributor · added in 0.9
Contributor · added in 1.7
Contributor · added in 1.23
Contributor · added in 1.7
Contributor · added in 1.19
Contributor · added in 1.29
Contributor · added in 1.1
Contributor · added in 1.38
Contributor · added in 0.5
Contributor · added in 1.9
Contributor · added in 1.32
Contributor · added in 1.10
Contributor · added in 0.7
Contributor · added in 1.3
Contributor · added in 1.9
Contributor · added in 1.6
Contributor · added in 1.52
Contributor · added in 1.7
Contributor · added in 1.9
Contributor · added in 1.16
Contributor · added in 1.16
Contributor · added in 1.20
Contributor · added in 1.6
Contributor · added in 1.7
Contributor · added in 1.21
Contributor · added in 1.40
Contributor · added in 1.11
Contributor · added in 1.20
Contributor · added in 1.6
Contributor · added in 1.9
Contributor · added in 1.10
Contributor · added in 1.23
Contributor · added in 0.7
Contributor · added in 1.12
Contributor · added in 1.9
Contributor · added in 1.22
Contributor · added in 1.9
Contributor · added in 1.3
Contributor · added in 1.16
Contributor · added in 1.3
Contributor · added in 1.32
Contributor · added in 1.18
Contributor · added in 1.6
Contributor · added in 1.9
the CSS files under inst/themes/ were derived from the Highlight package http://www.andre-simon.de
Contributor · added in 1.15.1
Contributor
Contributor · added in 3.0.1
Contributor · added in 0.6.3
Contributor · added in 3.0.1
Contributor · added in 2.15.0
Contributor · added in 1.9
Contributor · added in 1.6
Contributor · added in 1.21
Contributor · added in 0.7
Contributor
Contributor · added in 1.19
Contributor · added in 1.12
Contributor · added in 0.7
Contributor · added in 1.33
Contributor · added in 1.23
Contributor · added in 1.10
Contributor · added in 1.52
Contributor · added in 1.21
Contributor · added in 1.10
Contributor · added in 1.21
Contributor · added in 1.4
Contributor · added in 0.7
Copyright holder, Funder · added in 1.43
Listed in earlier versions (8)
Show 8 peopleHide 8 people
Joseph Allaire
no longer listed · 2.15.0 to 2.15.2
Joseph J. Allaire
no longer listed · 0.9 to 1.2
no longer listed · 1.3 to 1.7
Adam Vogt [ctb] Alastair Andrew [ctb]
no longer listed · 1.8
Donald Arseneau
no longer listed · 1.9 to 1.22
Frank E
no longer listed · 1.9 to 1.52
Kevin K.
no longer listed · 1.9 to 1.52
Simon de
no longer listed · 1.9 to 1.52
Releases (76)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • R
    R 4.0.0 released · 2020-04-24
  • R
    R 3.6.0 released · 2019-04-26
  • R
    R 3.5.0 released · 2018-04-23
  • R
    R 3.4.0 released · 2017-04-21
  • R
    R 3.3.0 released · 2016-05-03
  • R
    R 3.2.0 released · 2015-04-16
  • R
    R 3.1.0 released · 2014-04-10
  • 3.0.3Latest
    record
    2013-09-28 · current release · diff ↗
  • 3.0.2
    record
    2013-08-10 · diff ↗
  • 3.0.1
    record
    2013-04-10 · diff ↗ ·
    removed 1 export
    hook_rjournal
    added 2 exports
    pandoc, wrap_rmd
Show 76 earlier eventsHide 76 earlier events
  • R
    R 3.0.0 released · 2013-04-03
  • 2.15.3
    record
    2013-02-16 · diff ↗
  • 2.15.2
    record
    2012-09-05 · diff ↗
  • 2.15.1
    record
    2012-06-11 · diff ↗
  • R
    R 2.15.0 released · 2012-03-30
  • 2.15.0
    record
    2012-03-15 · diff ↗ ·
    added 1 export
    build_dep
  • 2.14.2
    record
    2012-02-28 · diff ↗
  • 1.52
    record
    2026-09-06 · diff ↗ ·
    added 4 exports
    hook_plot_typst, hooks_typst, pat_typst, render_typst
  • 1.51
    record
    2025-12-20 · diff ↗
  • 1.50
    record
    2025-03-16 · diff ↗ ·
    removed 1 export
    read_rforge
  • 1.49
    record
    2024-11-08 · diff ↗
  • 1.48
    record
    2024-07-07 · diff ↗
  • 1.47
    record
    2024-05-29 · diff ↗
  • 1.46
    record
    2024-04-06 · diff ↗
  • 1.45
    record
    2023-10-30 · diff ↗
  • 1.44
    record
    2023-09-11 · diff ↗ ·
    added 1 export
    download_image
  • 1.43
    record
    2023-05-25 · diff ↗
  • 1.42
    record
    2023-01-25 · diff ↗
  • 1.41
    record
    2022-11-18 · diff ↗
  • 1.40
    record
    2022-08-24 · diff ↗ ·
    added 1 export
    convert_chunk_header
  • 1.39
    record
    2022-04-27 · diff ↗
  • 1.38
    record
    2022-03-25 · diff ↗ ·
    added 2 exports
    partition_chunk, rnw2pdf
  • 1.37
    record
    2021-12-16 · diff ↗
  • 1.36
    record
    2021-09-29 · diff ↗
  • 1.35
    record
    2021-09-28 · diff ↗
  • 1.34
    record
    2021-09-09 · diff ↗
  • 1.33
    record
    2021-04-24 · diff ↗ ·
    added 2 exports
    is_low_change, sew
  • 1.32
    record
    2021-04-14 · diff ↗
  • 1.31
    record
    2021-01-27 · diff ↗ ·
    added 2 exports
    pandoc_from, pandoc_to
  • 1.30
    record
    2020-09-22 · diff ↗ ·
    added 9 exports
    hooks_asciidoc, hooks_html, hooks_jekyll, hooks_latex, hooks_listings, hooks_markdown, hooks_rst, hooks_sweave, hooks_textile
  • 1.29
    record
    2020-06-23 · diff ↗ ·
    added 1 export
    kables
  • 1.28
    record
    2020-02-06 · diff ↗
  • 1.27
    record
    2020-01-16 · diff ↗
  • 1.26
    record
    2019-11-12 · diff ↗
  • 1.25
    record
    2019-09-18 · diff ↗
  • 1.24
    record
    2019-08-08 · diff ↗
  • 1.23
    record
    2019-05-18 · diff ↗ ·
    added 2 exports
    hook_mogrify, knit_code
  • 1.22
    record
    2019-03-09 · diff ↗
  • 1.21
    record
    2018-12-11 · diff ↗ ·
    added 5 exports
    cache_engines, hook_gifski, raw_block, raw_html, raw_latex
  • 1.20
    record
    2018-02-20 · diff ↗
  • 1.19
    record
    2018-01-29 · diff ↗
  • 1.18
    record
    2017-12-27 · diff ↗ ·
    added 2 exports
    is_html_output, is_latex_output
  • 1.17
    record
    2017-08-10 · diff ↗
  • 1.16
    record
    2017-05-18 · diff ↗ ·
    added 1 export
    knit2pandoc
  • 1.15.1
    record
    2016-11-22 · diff ↗ ·
    added 1 export
    hook_pngquant
  • 1.15
    record
    2016-11-09 · diff ↗ ·
    added 3 exports
    extract_raw_output, raw_output, restore_raw_output
  • 1.14
    record
    2016-08-13 · diff ↗ ·
    added 1 export
    all_rcpp_labels
  • 1.13
    record
    2016-05-09 · diff ↗ ·
    removed 1 export
    eclipse_theme
    added 4 exports
    combine_words, include_app, include_url, knit_meta_add
  • 1.12.3
    record
    2016-01-22 · diff ↗
  • 1.12
    record
    2016-01-07 · diff ↗ ·
    added 3 exports
    include_graphics, knit_watch, opts_hooks
  • 1.11
    record
    2015-08-14 · diff ↗ ·
    removed 2 exports
    hook_rgl, hook_webgl
    added 1 export
    knit_params_yaml
  • 1.10.5
    record
    2015-05-06 · diff ↗
  • 1.10
    record
    2015-04-23 · diff ↗ ·
    added 1 export
    knit_params
  • 1.9
    record
    2015-01-20 · diff ↗ ·
    added 2 exports
    clean_cache, load_cache
  • 1.8
    record
    2014-11-11 · diff ↗ ·
    added 5 exports
    engine_output, fig_chunk, inline_expr, knit_filter, spin_child
  • 1.7
    record
    2014-10-13 · diff ↗
  • 1.6
    record
    2014-05-25 · diff ↗ ·
    added 10 exports
    asis_output, current_input, hook_plot_textile, hook_purl, knit_meta, knit_print, normal_print, pat_textile, plot_crop, render_textile
  • 1.5
    record
    2013-09-28 · diff ↗
  • 1.4.1
    record
    2013-08-12 · diff ↗
  • 1.4
    record
    2013-08-10 · diff ↗ ·
    added 1 export
    rocco
  • 1.3
    record
    2013-07-15 · diff ↗ ·
    added 5 exports
    hook_plot_asciidoc, kable, knit_exit, pat_asciidoc, render_asciidoc
  • 1.2
    record
    2013-07-16 · diff ↗
  • 1.1
    record
    2013-02-16 · diff ↗ ·
    removed 2 exports
    build_dep, run_chunk
    added 2 exports
    hook_webgl, knit2wp
  • 1.0.5
    record
    2013-01-21 · diff ↗
  • 1.0
    record
    2013-01-14 · diff ↗ ·
    removed 1 export
    knit_env
    added 7 exports
    Sweave2knitr, all_labels, hook_rjournal, knit_expand, knit_global, stitch_rhtml, stitch_rmd
  • 0.9
    record
    2013-01-20 · diff ↗ ·
    added 5 exports
    hook_movecode, knit_rd_all, read_demo, read_rforge, set_alias
  • 0.8
    record
    2012-09-04 · diff ↗ ·
    added 1 export
    knit_rd
  • 0.7
    record
    2012-07-17 · diff ↗ ·
    added 10 exports
    dep_auto, dep_prev, hook_ffmpeg_html, hook_optipng, hook_r2swf, hook_scianimator, image_uri, opts_template, rand_seed, rst2pdf
  • 0.6.3
    record
    2012-06-22 · diff ↗
  • 0.6
    record
    2012-06-11 · diff ↗ ·
    added 1 export
    spin
  • 0.5
    record
    2012-04-29 · diff ↗ ·
    removed 1 export
    render_gfm
    added 7 exports
    hook_plot_rst, knit2html, knit_engines, pat_md, pat_rst, render_rst, write_bib
  • 0.4
    record
    2012-04-29 · diff ↗
  • 0.3
    record
    2012-02-28 · diff ↗ ·
    added 8 exports
    imgur_upload, pat_brew, pat_html, pat_rnw, pat_tex, render_listings, run_chunk, set_parent
  • 0.2
    record
    2012-01-28 · diff ↗ ·
    added 4 exports
    knit_child, knit_env, purl, stitch
  • 0.1
    record
    2012-01-17
  • R
    R 2.14.0 released · 2011-10-31

Package metadata

First published
2012-01-17
Total releases
76 / 14 yrs
License
GPL
Minimum R
≥ 3.6.0
Download size
479 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("knitr")

The package provides a citation file that builds its entry when R runs it. Run citation() to see it.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for knitr version 1.52 [Data set]. HJJB, LLC. Data release v2026-10-17. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-17, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy