R Observatory
Search
install.packages("knitr")
CRAN 30-day downloads, method
1.1M−13.8% down on the 30 days before, the worse direction
Dependent packages, method
49111,605 more suggest it
Test coverage, method
42%of lines run by tests

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

Maintainer
Yihui Xie
Licence
GPL
Latest release
6 Sep 2026
First release
17 Jan 2012

Compare with another package

More details
Releases
76
Needs compilation
No
Needs R
>= 3.6.0
Config/roxygen2/version
8.1.0
SystemRequirements
Package vignettes based on R Markdown v2 or reStructuredText require Pandoc (http://pandoc.org). The function rst2pdf() requires rst2pdf (https://github.com/rst2pdf/rst2pdf).
Task views (2)
Subjects (1) Method, Subjects
Cite

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.

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-26. https://doi.org/10.5281/zenodo.21843040
About

From data release v2026-10-26, which the citation names so these numbers can be found later.

All 13 check platforms pass.

  • r-devel-linux-x86_64-debian-clang

    The unreleased R on Linux, x86_64, debian-clang

    OK

    Version checked
    1.52
    Time taken
    113 s
  • r-devel-linux-x86_64-debian-gcc

    The unreleased R on Linux, x86_64, debian-gcc

    OK

    Version checked
    1.52
    Time taken
    85 s
  • r-devel-linux-x86_64-fedora-clang

    The unreleased R on Linux, x86_64, fedora-clang

    OK

    Version checked
    1.52
    Time taken
    90 s
  • r-devel-linux-x86_64-fedora-gcc

    The unreleased R on Linux, x86_64, fedora-gcc

    OK

    Version checked
    1.52
    Time taken
    82 s
  • r-devel-windows-x86_64

    The unreleased R on Windows, x86_64

    OK

    Version checked
    1.52
    Time taken
    184 s
  • r-oldrel-macos-arm64

    The previous release of R on macOS, arm64

    OK

    Version checked
    1.52
    Time taken
    39 s
  • r-oldrel-macos-x86_64

    The previous release of R on macOS, x86_64

    OK

    Version checked
    1.52
    Time taken
    137 s
  • r-oldrel-windows-x86_64

    The previous release of R on Windows, x86_64

    OK

    Version checked
    1.52
    Time taken
    200 s
  • r-patched-linux-x86_64

    The patched release of R on Linux, x86_64

    OK

    Version checked
    1.52
    Time taken
    109 s
  • r-release-linux-x86_64

    The current release of R on Linux, x86_64

    OK

    Version checked
    1.52
    Time taken
    107 s
  • r-release-macos-arm64

    The current release of R on macOS, arm64

    OK

    Version checked
    1.52
    Time taken
    44 s
  • r-release-macos-x86_64

    The current release of R on macOS, x86_64

    OK

    Version checked
    1.52
    Time taken
    121 s
  • r-release-windows-x86_64

    The current release of R on Windows, x86_64

    OK

    Version checked
    1.52
    Time taken
    182 s
  • 13 OK

Over time

No change since 5 Aug 2026

As a list (10)
ChangedWorst statusOKNotesWarningsErrors
5 Aug 2026OK13000
1 Aug 2026Note12100
29 Jul 2026Error12001
11 Jul 2026OK13000
10 Jul 2026Error12001
1 Jul 2026OK13000
29 Jun 2026Error12001
9 Jun 2026OK13000
8 Jun 2026Error12001
10 Mar 2026OK14000

Since March 2026

Check results on CRAN

Total downloads in the last 30 days
1,367,972−5.9% down on the 30 days before, the worse directionIt is the sum of 6 channels: CRAN, r2u, autoCRAN, conda-forge, Bioconda and c2d4u.

CRAN rank

35 of 26,529

CRAN

1,110,979 downloads in the last 30 days

Rank
35 of 26,529
Change
−13.8% down on the 30 days before, the worse direction

It is in the total. Take it out

r2u

59,010 downloads in the last 30 days

Rank
16 of 30,526
Change
+146% up on the 30 days before, the better direction

It is in the total. Take it out

autoCRAN

129 downloads in the last 30 days

Rank
543 of 29,130
Change
−12.8% down on the 30 days before, the worse direction

It is in the total. Take it out

conda-forge

196,494 downloads in the last 30 days

Rank
64 of 3,828
Change
+39.9% up on the 30 days before, the better direction

It is in the total. Take it out

Bioconda

20 downloads in the last 30 days

Rank
4,194 of 4,976
Change
+33.3% up on the 30 days before, the better direction

It is in the total. Take it out

c2d4u, no longer updated

1,340 downloads in the last 30 days

Rank
46 of 7,575
Change
−9.7% down on the 30 days before, the worse direction

It is in the total. Take it out

Over time

Compare downloads

Needs
6
Dependent packages
491
Suggested by
11,605
Needs (6)
Installing it adds
4 packages, 381 KB of source
Of those, need compilation
2
Optional extras (30)
Dependent packages (50 of 491)
PackageTitleDownloads in 30 days
rmarkdownDynamic Documents for R1,392,775
htmlwidgetsHTML Widgets for R681,735
reprexPrepare Reproducible Example Code via the Clipboard400,034
roxygen2In-Line Documentation for R273,509
HmiscHarrell Miscellaneous203,965
htmlTableAdvanced Tables for Markdown/HTML164,483
flextableFunctions for Tabular Reporting92,853
kableExtraConstruct Complex Table with 'kable' and Pipe Syntax90,828
bookdownAuthoring Books and Technical Documents with R Markdown64,607
rgl3D Visualization Using OpenGL62,252
lintrA 'Linter' for R Code59,631
spellingTools for Spell Checking in R57,470
skimrCompact and Flexible Summaries of Data35,751
rmsRegression Modeling Strategies28,318
tablesFormula-Driven Table Generation26,818
learnrInteractive Tutorials for R22,226
sjPlotData Visualization for Statistics in Social Science21,665
formattableCreate 'Formattable' Data Structures17,001
scoringRulesScoring Rules for Parametric and Simulated Distribution Forecasts16,016
targetsDynamic Function-Oriented 'Make'-Like Declarative Pipelines12,949
flexdashboardR Markdown Format for Flexible Dashboards12,492
ergmFit, Simulate and Diagnose Exponential-Family Models for Networks8,994
rticlesArticle Formats for R Markdown7,702
table1Tables of Descriptive Statistics in HTML7,129
JuliaCallSeamless Integration Between R and 'Julia'6,667
vcdExtra'vcd' Extensions and Additions6,227
officedownEnhanced 'R Markdown' Format for 'Word' and 'PowerPoint'6,025
arsenalAn Arsenal of 'R' Functions for Large-Scale Statistical Summaries5,833
gtExtrasExtending 'gt' for Beautiful HTML Tables5,783
kinship2Pedigree Functions5,261
xaringanPresentation Ninja5,258
rpactConfirmatory Adaptive Clinical Trial Design and Analysis4,586
qreportStatistical Reporting with 'Quarto'4,534
rmdformatsHTML Output Formats and Templates for 'rmarkdown' Documents4,136
tufteTufte's Styles for R Markdown Documents4,134
GmiscDescriptive Statistics, Transition Plots, and More3,795
moderndiveTidyverse-Friendly Introductory Linear Regression3,731
examsAutomatic Generation of Exams in R3,567
attachmentDeal with Dependencies3,463
MendelianRandomizationMendelian Randomization Package3,455
umxStructural Equation Modeling and Twin Modeling in R3,444
manipulateWidgetAdd Even More Interactivity to Interactive Charts3,145
matlibMatrix Functions for Teaching and Learning Linear Algebra and Multivariate Statistics3,128
fda.uscFunctional Data Analysis and Utilities for Statistical Computing3,052
vtableVariable Table for Variable Documentation2,975
GregRegression Helper Functions2,824
lessRLess Code with More Comprehensive Results2,816
gistrWork with 'GitHub' 'Gists'2,799
equatiomaticTransform Models into 'LaTeX' Equations2,550
lemonFreshing Up your 'ggplot2' Plots2,541
Functions
467
Public exports
133
Lines of R code
10,264
Median complexity
2
Functions (467)
Size and composition

Lines by kind (16,705)

KindLinesShare
R code10,26461%
Tests1,94112%
Documentation3,69522%
Guides8055%

Lines by language

LanguageLinesShare
R12,15973%
Rd3,69522%
Vignettes7725%
Other790.5%

Languages are counted from file extensions.

Files
311
R functions
467
Object systems
S3: 19 methods
Deprecated functions
1
Complexity
Median
2
Mean
4.42
Highest
58
Median lines per function
7
About complexity

Cyclomatic complexity counts the independent paths through a function: 1 is a straight line, higher is harder to test. R functions only.

Call graph figures
R functions
467
Calls
794
Unconnected
41
Groups
5
Growth (76 releases)
Total lines by release
2,441 on 17 Jan 201216,705 on 6 Sep 2026
Release changes

The tests ran and coverage was measured.

Lines run by tests
41.6%
Expressions run by tests
44.1%
Test cases
161
Exports named in tests
34.6%
Coverage by file (39)
Coverage run
Lines counted
4,685
Lines the tests ran
1,947
Tests passed
Yes
Measured with
covr 3.6.5 on R 4.6.1
Test suite
Has tests
Yes
Test frameworks
testit
Test cases
161
Lines of tests
1,941
Test lines per line of code
0.19
Exports documented
100%
Arguments documented
88.7%
Return value documented
63.5%
Help pages with examples
65.8%
Examples run in checks
84%
Guides (9)
Other documentation
README
No
Release notes file
Yes
Help pages
76
Lines of documentation
3,695
More people (89)

Funded by Posit Software, PBC

Earlier names (5)
  • Adam Vogt [ctb] Alastair Andrew [ctb]
  • Donald Arseneau
  • J.J. Allaire
  • Joseph Allaire
  • Joseph J. Allaire

yihui / knitr on github.com

Stars
2,471+0.12% up on 30 days ago, the better direction
Forks
875
Open issues
3
Last commit
26 Oct 2026
Activity
Commits
6,574
Open pull requests
3
Tagged releases
66
Latest tagged release
v1.52, 6 Sep 2026
In development
Default branch at 1.52.4, ahead of CRAN 1.52 (checked 2026-10-25)
Issues closed in
1,496 days (median)
Pull requests closed in
0 days (median)
Pull requests merged
80%
Created
17 Oct 2011
Licence file reads as
–
Development practices (12)
KindFound
Continuous integrationGitHub Actions, R CMD check workflow
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Governance and communityContributing guide, Issue templates, Funding
Funding links: GitHub Sponsors
The repository owner accepts GitHub Sponsors
Docs sourceGitHub Pages site last deployed 2026-10-12
CoverageCoverage reporting (Codecov)
Reproducibility and dev environmentMakefile
Automation and maintenanceDependabot
Lint, format, editorRStudio project
Git structural.gitattributes

Method, repository practices

Across yihui

GitHub Copilot4 commits by it and at least 4 crediting itGitHub CopilotFirst seen 20 Mar 20264 commits by itat least 4 crediting it
Claude Codeat least 70 crediting itClaude CodeFirst seen 20 May 2026at least 70 crediting it
Claude Sonnet 4.61MClaude Sonnet 4.61M context window12 Oct 20261 commit
Claude Sonnet 4.5Claude Sonnet 4.527 Aug 20261 commit
Claude Opus 4.8Claude Opus 4.821 Aug 2026 to 21 Sep 202664 commits
Claude Opus 4.6Claude Opus 4.620 May 2026 to 22 May 20264 commits

Tools

ToolFirst seenFoundCommits by itCommits crediting it
GitHub Copilot20 Mar 2026Seen in the repository.github/copilot-instructions.md.github/workflows/copilot-setup-steps.ymlPull request: opened by its own account44 at least
Claude Code20 May 2026Seen in the repositoryCLAUDE.mdPull request it wrote: opened by a project member70 at least
  • Seen in the repository
  • Pull request

Models

ModelContext windowCommitsFirst commitLast commitCredit lines of
Claude Sonnet 4.61M112 Oct 202612 Oct 2026Claude Code
Claude Sonnet 4.5127 Aug 202627 Aug 2026Claude Code
Claude Opus 4.86421 Aug 202621 Sep 2026Claude Code
Claude Opus 4.6420 May 202622 May 2026Claude Code

Across yihui

R releases
  • On CRAN
  • Release
VersionReleasedR
1.52 current6 Sep 20264.6.1
1.5120 Dec 20254.5.2
1.5016 Mar 20254.4.3
1.498 Nov 20244.4.2
1.487 Jul 20244.4.1
1.4729 May 20244.4.0
1.466 Apr 20244.3.3
1.4530 Oct 20234.3.1
Earlier versions (68)
VersionReleasedR
1.4411 Sep 20234.3.1
1.4325 May 20234.3.0
1.4225 Jan 20234.2.2
1.4118 Nov 20224.2.2
1.4024 Aug 20224.2.1
1.3927 Apr 20224.2.0
1.3825 Mar 20224.1.3
1.3716 Dec 20214.1.2
1.3629 Sep 20214.1.1
1.3528 Sep 20214.1.1
1.349 Sep 20214.1.1
1.3324 Apr 20214.0.5
1.3214 Apr 20214.0.5
1.3127 Jan 20214.0.3
1.3022 Sep 20204.0.2
1.2923 Jun 20204.0.0
1.286 Feb 20203.6.2
1.2716 Jan 20203.6.2
1.2612 Nov 20193.6.1
1.2518 Sep 20193.6.1
1.248 Aug 20193.6.1
1.2318 May 20193.6.0
1.229 Mar 20193.5.2
1.2111 Dec 20183.5.0
1.2020 Feb 20183.4.3
1.1929 Jan 20183.4.3
1.1827 Dec 20173.4.3
1.1710 Aug 20173.4.1
1.1618 May 20173.4.0
1.15.122 Nov 20163.3.2
1.159 Nov 20163.3.2
1.1413 Aug 20163.3.1
1.139 May 20163.3.0
1.12.322 Jan 20163.2.3
1.127 Jan 20163.2.3
1.1114 Aug 20153.2.2
1.10.56 May 20153.2.0
1.1023 Apr 20153.2.0
1.920 Jan 20153.1.2
1.811 Nov 20143.1.2
1.713 Oct 20143.1.1
1.625 May 20143.1.0
3.0.328 Sep 2013 first seen3.0.2
1.528 Sep 20133.0.2
1.4.112 Aug 20133.0.1
3.0.210 Aug 2013 first seen3.0.1
1.410 Aug 20133.0.1
1.216 Jul 20133.0.1
1.315 Jul 20133.0.1
3.0.110 Apr 20133.0.0
2.15.316 Feb 2013 first seen2.15.2
1.116 Feb 20132.15.2
1.0.521 Jan 20132.15.2
0.920 Jan 20132.15.2
1.014 Jan 20132.15.2
2.15.25 Sep 20122.15.1
0.84 Sep 20122.15.1
0.717 Jul 20122.15.1
0.6.322 Jun 20122.15.1
2.15.111 Jun 2012 first seen2.15.0
0.611 Jun 20122.15.0
0.529 Apr 20122.15.0
0.429 Apr 20122.15.0
2.15.015 Mar 20122.14.2
2.14.228 Feb 2012 first seen2.14.1
0.328 Feb 20122.14.1
0.228 Jan 20122.14.1
0.117 Jan 20122.14.1