R Observatory
Search
install.packages("argparse")
CRAN 30-day downloads, method
4,577−0.8% down on the 30 days before, the worse direction
Test coverage, method
94%of lines run by tests

A command line parser to be used with 'Rscript' to write "#!" shebang scripts that gracefully accept positional and optional arguments and automatically generate usage.

Maintainer
Trevor L. Davis
Licence
GPL (>= 2)
Latest release
8 Oct 2025
First release
29 Jan 2013

Compare with another package

More details
Releases
24
Needs compilation
No
Needs R
>= 3.6.0
RoxygenNote
7.3.3
SystemRequirements
python (>= 3.2)
Subjects (1) Method, Subjects
Cite

Package

Run in R for the authors' preferred citation:

citation("argparse")
APA
Davis, T. L., Python Software Foundation, Day, A., & Newell, P. (2025). argparse: Command Line Optional and Positional Argument Parser (Version 2.3.1) [Computer software]. https://doi.org/10.32614/CRAN.package.argparse
About

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

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 argparse version 2.3.1 [Data set]. HJJB, LLC. Data release v2026-10-28. https://doi.org/10.5281/zenodo.21843040
About

From data release v2026-10-28, 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
    2.3.1
    Time taken
    62 s
  • r-devel-linux-x86_64-debian-gcc

    The unreleased R on Linux, x86_64, debian-gcc

    OK

    Version checked
    2.3.1
    Time taken
    56 s
  • r-devel-linux-x86_64-fedora-clang

    The unreleased R on Linux, x86_64, fedora-clang

    OK

    Version checked
    2.3.1
    Time taken
    49 s
  • r-devel-linux-x86_64-fedora-gcc

    The unreleased R on Linux, x86_64, fedora-gcc

    OK

    Version checked
    2.3.1
    Time taken
    53 s
  • r-devel-windows-x86_64

    The unreleased R on Windows, x86_64

    OK

    Version checked
    2.3.1
    Options
    --no-vignettes
    Time taken
    122 s
  • r-oldrel-macos-arm64

    The previous release of R on macOS, arm64

    OK

    Version checked
    2.3.1
  • r-oldrel-macos-x86_64

    The previous release of R on macOS, x86_64

    OK

    Version checked
    2.3.1
    Time taken
    121 s
  • r-oldrel-windows-x86_64

    The previous release of R on Windows, x86_64

    OK

    Version checked
    2.3.1
    Options
    --no-vignettes
    Time taken
    54 s
  • r-patched-linux-x86_64

    The patched release of R on Linux, x86_64

    OK

    Version checked
    2.3.1
    Time taken
    55 s
  • r-release-linux-x86_64

    The current release of R on Linux, x86_64

    OK

    Version checked
    2.3.1
    Time taken
    55 s
  • r-release-macos-arm64

    The current release of R on macOS, arm64

    OK

    Version checked
    2.3.1
    Time taken
    42 s
  • r-release-macos-x86_64

    The current release of R on macOS, x86_64

    OK

    Version checked
    2.3.1
    Time taken
    134 s
  • r-release-windows-x86_64

    The current release of R on Windows, x86_64

    OK

    Version checked
    2.3.1
    Options
    --no-vignettes
    Time taken
    51 s
  • 13 OK

Over time

No change since 5 Aug 2026

As a list (3)
ChangedWorst statusOKNotesWarningsErrors
5 Aug 2026OK13000
1 Aug 2026Note12100
10 Mar 2026OK14000

Since March 2026

Check results on CRAN

Total downloads over all time
1,196,245It is the sum of 5 channels: CRAN, r2u, autoCRAN, conda-forge and Bioconda.

CRAN

954,790 downloads over all time

Since
3 Feb 2013

It is in the total. Take it out

r2u

6,048 downloads over all time

Since
22 May 2022

It is in the total. Take it out

autoCRAN

116 downloads over all time

Since
29 Jun 2026

It is in the total. Take it out

conda-forge

227,163 downloads over all time

Since
29 Apr 2017

It is in the total. Take it out

Bioconda

8,128 downloads over all time

Since
3 Apr 2017

It is in the total. Take it out

Over time

Compare downloads

Needs
3
Dependent packages
0
Suggested by
1
Needs (3)
Installing it adds
3 packages, 1.1 MB of source
Of those, need compilation
1
Optional extras (3)
Functions
16
Public exports
1
Lines of R code
543
Median complexity
2
Functions (16)
Size and composition

Lines by kind (1,178)

KindLinesShare
R code54346%
Tests47140%
Documentation494%
Guides11510%

Lines by language

LanguageLinesShare
R1,01486%
Vignettes11510%
Rd494%

Languages are counted from file extensions.

Files
23
R functions
16
Object systems
R6: 5 classes
Complexity
Median
2
Mean
3.31
Highest
10
Median lines per function
12.5
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
16
Calls
13
Unconnected
2
Groups
2
Growth (24 releases)
Total lines by release
236 on 29 Jan 20131,178 on 8 Oct 2025
Release changes

The tests ran and coverage was measured.

Lines run by tests
93.7%
Expressions run by tests
91.6%
Test cases
19
Exports named in tests
100%
Coverage by file (1)
Coverage run
Lines counted
335
Lines the tests ran
314
Tests passed
Yes
Measured with
covr 3.6.5 on R 4.6.1
Test suite
Has tests
Yes
Test frameworks
testthat
Test cases
19
Lines of tests
471
Test lines per line of code
0.87
Exports documented
100%
Arguments documented
100%
Return value documented
100%
Help pages with examples
100%
Examples run in checks
100%
Guides (1)
Other documentation
README
Yes, 562 words
Release notes file
Yes
Help pages
1
Lines of documentation
49
Earlier names (2)
  • the Python Software Foundation. Ports examples from the getopt package by Allen Day.
  • Trevor L Davis

trevorld / r-argparse on github.com

Stars
109no change on 30 days ago
Forks
10
Open issues
3
Last commit
9 May 2026
Activity
Commits
156
Open pull requests
0
Tagged releases
16
Latest tagged release
v2.3.1, 9 Oct 2025
In development
Default branch at 2.3.2-1, ahead of CRAN 2.3.1 (checked 2026-10-25)
Issues closed in
2 days (median)
Pull requests closed in
0 days (median)
Pull requests merged
86%
Created
27 Apr 2013
Licence file reads as
GPL-2.0
Development practices (14)
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, Funding
Funding links: GitHub Sponsors
The repository owner accepts GitHub Sponsors
Docs sourcepkgdown
CoverageCoverage reporting
Reproducibility and dev environmentdata-raw/
CRAN release processcran-comments.md
Automation and maintenancepre-commit
Lint, format, editorlintr, Lint workflow, Air, EditorConfig

Method, repository practices

Across trevorld

Claude Codeat least 1 crediting itClaude CodeFirst seen 22 Mar 2026at least 1 crediting it
Claude Sonnet 4.6Claude Sonnet 4.622 Mar 20261 commit

Tools

ToolFirst seenFoundCommits crediting it
Claude Code22 Mar 2026Named in .Rbuildignore.claudeNamed in .gitignore.claude1 at least
  • Named in .Rbuildignore
  • Named in .gitignore

Models

ModelCommitsFirst commitLast commitCredit lines of
Claude Sonnet 4.6122 Mar 202622 Mar 2026Claude Code

Across trevorld

R releases
  • On CRAN
  • Release
VersionReleasedR
2.3.1 current8 Oct 20254.5.1
2.2.520 Dec 20244.4.2
2.2.420 Nov 20244.4.2
2.2.310 Apr 20244.3.3
2.2.215 Feb 20234.2.2
2.2.18 Dec 20224.2.2
2.1.617 Jul 20224.2.1
2.1.520 Apr 20224.1.3
Earlier versions (16)
VersionReleasedR
2.1.326 Nov 20214.1.2
2.1.221 Oct 20214.1.1
2.1.18 Sep 20214.1.1
2.0.47 Aug 20214.1.0
2.0.319 Oct 20204.0.3
2.0.18 Mar 20193.5.2
2.0.01 Dec 20183.5.0
1.1.124 Jan 20183.4.3
1.1.030 Nov 20173.4.3
1.0.723 Aug 20173.4.1
1.0.428 Oct 20163.3.1
1.0.15 Apr 20143.0.3
1.0.04 Apr 20143.0.3
0.5.326 Aug 20133.0.1
0.5.231 Jan 20132.15.2
0.5.029 Jan 20132.15.2
Release notes (2.3.1)
  • The ArgumentGroup R6 Class (as returned by ArgumentParser()$add_argument_group()) now supports an add_mutually_exclusive_group() method (#59). Suggestion of Brar Piening (@Brar).