Formatting Numbers in 'rmarkdown' Documents
Overview
Provides a small set of tools for formatting numbers in R-markdown documents. Convert a numerical vector to character strings in power-of-ten form, decimal form, or measurement-units form; convert symbols for chemical isotopes from hyphenated form to nuclear form; all are math-delimited for rendering as inline equations. Can also convert text into math-delimited text to match the font face and size of math-delimited numbers. Useful for rendering single numbers in inline R code chunks and for rendering columns in tables.
new features
- New
format_nucl()formats chemical isotopes in nuclear notation. formatdown_options()gains theZandwarnarguments used byformat_nucl().
minor improvements and fixes
format_numbers(0, format = "sci")now correctly yields a zero without power-of-ten notation. Likewise forformat = "engr"(#10).- In
formatdown_options(),multiply_markcan now be set to"\\cdot"(center dot), often used whendecimal_markis a comma.
<!-- MAJOR version when you make incompatible API changes -->
<!-- MINOR version add functionality in a backwards-compatible manner -->
<!-- PATCH version backwards-compatible bug fixes -->
<!-- DEV 900x development -->
<!-- ## Breaking changes -->
<!-- ## New features -->
Show all changes in 0.2.0Hide the rest of the changes in 0.2.0
<!-- ## Minor improvements and fixes -->
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
The repository also keeps web-only articles.
- Help pages
- 13 (1 internal)includes a package overview page
- Examples that run
- 100%7 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 91%
- Return-value docs
- 100%
- Help pages citing references
- 0% with a bibliography file
Downloads
Repository
- PRs merged (all time)
- not measured
- Median days to close, 50 most recently updated closed issues
- 63
- Median days to close, 50 most recently updated closed PRs
- not measured
Stars over time
Releases over time
Issues over time
8 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/graphdr/formatdown on 2026-10-25.
The R CMD check workflow runs on Linux
GitHub Pages site last deployed 2026-05-06
pkgdown site last built 2026-05-06
Dependencies
Installing formatdown adds 7 packages (5 with compiled code, 8.7 MB of source tarballs). Heaviest: data.table 5.7 MB, Rcpp 1.8 MB, wrapr 552 KB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 0.2.0Latest2026-05-02 · current release · diff ↗ ·
removed 3 exports
format_decimal, format_power, format_unitsadded 1 export
format_nucl - RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 0.1.42024-05-08 · diff ↗ ·
added 5 exports
format_dcml, format_engr, format_numbers, format_sci, formatdown_options - RR 4.4.0 released · 2024-04-24
- 0.1.3
- 0.1.2
- RR 4.3.0 released · 2023-04-21
- 0.1.12022-11-21
- RR 4.2.0 released · 2022-04-22
Package metadata
- First published
- 2022-11-21
- Total releases
- 5 / 4 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 3.5.0
- Bundled data
- 4.6 KB / 5 files
- Download size
- 48 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("formatdown")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-26, which the citation names so these numbers can be found later. More on citing and the projects behind them.