Process Command Line Arguments
Overview
Process command line arguments. Processing includes checking, naming, and coercing to numeric, date, or logical. By capturing assumptions about inputs and outputs, the 'command' package can provide scripts with well defined interfaces, leading to safer, more modular data analysis pipelines.
Variable-length file arguments
- Added
cmd_assign_collect()andcmd_assign_collect_quiet(), which assign every unnamed command-line argument to the one argument that was not passed by name. extract_make(),extract_shell(),makefile(), andshell_script()read calls tocmd_assign_collect(). A character vector of paths becomes one file name per element, and in a Makefile the last element is the target.extract_make(),extract_shell(),makefile(), andshell_script()now recognizecmd_assign_quiet(),cmd_assign_collect_quiet(), and a call written with acommand::orcommand:::prefix.
Show all changes in 0.3.0Hide the rest of the changes in 0.3.0
- The dot-name convention for file arguments has been documented in the help for
cmd_assign()andcmd_assign_collect(). shell_script()orders commands by matching output paths with input paths.cmd_assign()andcmd_assign_collect()reject a named command-line argument that is passed more than once.makefile(),shell_script(),extract_make(), andextract_shell()read literal values from calls. A name or a function call such asfile.path()orpaste()is an error.
Command-line values
- A named argument is split on the first
=, so the value may itself contain=. An argument with an empty name, such as--=value, is an error.
Shell commands
extract_shell()andshell_script()leave a plain length-1 vector unchanged, and quote a path or value only when it contains a space or a character that is special to the shell.NULLis written as--name=NULL.shell_script()rejects aquietvalue that is notTRUEorFALSE.
Bug fixes
- The message for a missing directory now says that the directory does not exist.
Documentation
- Revised the package description and the help pages.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK12 OK2026-04-25
- NOTE13 OK, 1 NOTE2026-03-10
Documentation
The repository also keeps web-only articles.
- Help pages
- 8includes a package overview page
- Examples that run
- 100%7 run in a plain check (2 of them under a condition)
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 63%
Downloads
Repository
- PRs merged (all time)
- not measured
- Median days to close, 50 most recently updated closed issues
- 11
- Median days to close, 50 most recently updated closed PRs
- not measured
Stars over time
Issues over time
Commits over time
10 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/bayesiandemography/command on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-10-17 · The repository has a site deploy workflow
pkgdown site last built 2026-10-17
Show all practicesHide 1 practice
This repository shows signs of AI coding tools.
- Cursorfirst seen on or before 2026-07-21Commits: at least 31 crediting it in the message
Dependencies
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 0.3.0Latest
- 0.2.0
- RR 4.6.0 released · 2026-04-24
- 0.1.32025-11-22 · diff ↗
- 0.1.22025-10-16
- RR 4.5.0 released · 2025-04-11
Package metadata
- First published
- 2025-10-16
- Total releases
- 4 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 3.5.0
- Download size
- 801 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("command")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.