Skip to content

getopt

1.21.1

C-Like 'getopt' Behavior

2packages depend
337.1Kdownloads / year
96.9%test coverage
13/13checks pass

Overview

About
Maintained by Trevor L. DavisFirst published 2008-04-1415 releasesCRAN page ↗GitHub ↗

Package designed to be used with Rscript to write '#!' shebang scripts that accept short and long flags/options. Many users will prefer using instead the packages optparse or argparse which add extra features like automatically generated help option and usage, support for default values, positional argument support, etc.

Install

Health

CRAN checks
13OK
Slowest check: 53 s · r-devel-windows-x86_64
Code health
Yes
Tests · ratio 0.81
96.9%
Coverage · measured lines
100%
Documentation · exports
0
Dependencies · direct
Check history
  • OK2026-08-05
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-08-01
    12 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-03-10
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMEYes · 366 wordsVignettesNopkgdown siteNoNEWSYes · 33% structuredCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
100%
Return-value docs
100%
References docs
0%

Downloads

337.1K
CRAN downloads in the past year
Rank #1,587 · ~924/day · ~28.1K/mo
Daily download trend is not available in this view yet.
4.7K30 days
15.8K90 days
337.1K1 year
Compare downloads with other packages →
Also on2.8K r2u2 autocran227.6K conda_forge220 c2d4u

Repository

Repository
12Stars
7Forks
0Open issues
0Open PRs
5Releases
74Commits
2Contributors
License GPL-2.0 · 74 commits · Last activity 2026-05-09

Stars over time

2024-12-11 · 122026-07-07 · 12

Repository practices

Upstream repositoryBeta

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

Checks run against github.com/trevorld/r-getopt on 2026-08-23.

Continuous integration (1)
GitHub Actions
Reproducibility and dev environment (1)
data-raw/
CRAN release process (1)
cran-comments.md
Automation and maintenance (1)
pre-commit
Show all practices
Lint, format, editor (3)
lintrAirEditorConfig
Governance and community (1)
Funding
How this is detected·Detection ruleset v1 (2026-07-18)

Development tooling

AI-assisted toolingBeta

Uses AI-assisted development tooling (declared in repo)

Earliest detected marker: claude on 2026-03-16

claude

Most recent: claude on 2026-03-16

Evidence
  • claude: on 2026-03-16 · evidence B, D
How this is detected·Detection ruleset v2 (updated 2026-07-29)

Dependencies

Declared dependencies
1 external dependency (excludes base and recommended)
Depends (1)
R >= 3.3
Imports (0)
none
LinkingTo (0)
none
Suggests (2)
Enhances (0)
none
Reverse dependencies
2direct
0indirect

Code & Tests

People & History

People (3)
Maintainer (1)
Author, Maintainer · added in 1.21.1
Authors (2)
Author, Maintainer · added in 1.21.1
Author
Contributors (1)
Contributor · added in 1.20.3
Listed in earlier versions (5)
no longer listed · 1.19.0 to 1.19.1
no longer listed · 1.20.1 to 1.20.2
no longer listed · 1.20.1 to 1.20.2
no longer listed · 1.20.3 to 1.20.4
Package Timeline

15 releases. Pick two to compare their code metrics. R releases are shown for context.

  • 1.21.1Latest
    2026-04-28 · current release · diff ↗
  • 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
  • 1.20.4
    2023-10-01 · diff ↗
  • 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
  • 1.20.3
    2019-03-22 · diff ↗
  • R
    R 3.5.0 released · 2018-04-23
  • 1.20.2
    2018-02-16 · diff ↗
  • 1.20.1
    2017-11-30 · diff ↗
  • R
    R 3.4.0 released · 2017-04-21
  • R
    R 3.3.0 released · 2016-05-03
Show 23 earlier events
  • R
    R 3.2.0 released · 2015-04-16
  • R
    R 3.1.0 released · 2014-04-10
  • 1.20.0
    2013-08-30 · diff ↗
  • R
    R 3.0.0 released · 2013-04-03
  • 1.19.1
    2013-03-04 · diff ↗
  • 1.19.0
    2012-11-18 · diff ↗
  • R
    R 2.15.0 released · 2012-03-30
  • R
    R 2.14.0 released · 2011-10-31
  • 1.17
    2011-09-26 · diff ↗
  • 1.16
    2011-05-02 · diff ↗
  • R
    R 2.13.0 released · 2011-04-13
  • R
    R 2.12.0 released · 2010-10-15
  • 1.15
    2010-04-28 · diff ↗
  • R
    R 2.11.0 released · 2010-04-22
  • R
    R 2.10.0 released · 2009-10-26
  • R
    R 2.9.0 released · 2009-04-17
  • R
    R 2.8.0 released · 2008-10-20
  • 1.14
    2008-04-30 · diff ↗
  • 1.12
    2008-04-23 · diff ↗
  • R
    R 2.7.0 released · 2008-04-22
  • 1.11
    2008-04-16 · diff ↗
  • 1.1
    2008-04-14
  • R
    R 2.6.0 released · 2007-10-03

Package metadata

First published
2008-04-14
Total releases
15 / 18 yrs
License
GPL (>= 2) OSI
Minimum R
≥ 3.3
Download size
26 KB
Installed size
not tracked yet
With dependencies
not tracked yet

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("getopt")
Davis, T. L., Day, A., & Zenka, R. (2026). getopt: C-Like 'getopt' Behavior (Version 1.21.1) [Computer software]. https://doi.org/10.32614/CRAN.package.getopt

This is what citation() produces when a package has no citation file of its own. If it prints something else, use that.

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 getopt version 1.21.1 [Data set]. HJJB, LLC. Data release v2026-08-23. https://doi.org/10.5281/zenodo.21843040

From data release v2026-08-23, 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