Help for Writing Unit Tests Based on Function Examples
Overview
Take the examples written in your documentation of functions and use them to create shells (skeletons which must be manually completed by the user) of test files to be tested with the 'testthat' package. Sort of like python 'doctests' for R.
BUG FIXES
gluehad breaking changes for whichexampletestrneeded to be fixed.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 1
- Examples that run
- 0%1 never run
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 0%
- A whole package HTML
- One .R file at a time HTML
- One function at a time HTML
Downloads
Repository
- PRs merged (all time)
- 75%
- Median days to close, 50 most recently updated closed issues
- 14
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
13 development-tooling and community-health practices detected across 8 families in the upstream repository
Checks run against github.com/rorynolan/exampletestr on 2026-10-11.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2024-10-07 · The repository has a site deploy workflow
Show all practicesHide 4 practices
Dependencies
Code & Tests
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 1.7.3Latest
- 1.7.22024-08-17 · diff ↗
- RR 4.4.0 released · 2024-04-24
- 1.7.12023-06-11 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 1.7.02022-12-06 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 1.6.52021-08-09 · diff ↗
- 1.6.42021-08-02 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 1.6.32021-04-24 · diff ↗
- 1.6.22020-11-17 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 1.6.12020-04-15 · diff ↗
Show 20 earlier eventsHide 20 earlier events
- 1.6.02020-04-08 · diff ↗
- 1.5.22019-11-05 · diff ↗
- 1.5.12019-08-04 · diff ↗
- 1.5.02019-07-05 · diff ↗
- 1.4.22019-05-31 · diff ↗
- RR 3.6.0 released · 2019-04-26
- 1.4.12018-11-07 · diff ↗
- 1.4.02018-09-27 · diff ↗ ·
removed 6 exports
construct_expect_equal, extract_examples, extract_examples_rd, extract_expressions, make_test_shell, text_parse_error - 1.3.12018-07-09 · diff ↗
- 1.3.0
- RR 3.5.0 released · 2018-04-23
- 1.2.02018-01-26 · diff ↗
- 1.1.12017-12-12 · diff ↗
- 1.1.02017-12-03 · diff ↗
- 1.0.12017-07-31 · diff ↗
- 1.0.02017-07-05 · diff ↗
- RR 3.4.0 released · 2017-04-21
- 0.4.02017-04-12 · diff ↗ ·
removed 2 exports
TextEval, text_eval_erroradded 2 exports
extract_examples_rd, text_parse_error - 0.3.02017-03-18
- RR 3.3.0 released · 2016-05-03
Package metadata
- First published
- 2017-03-18
- Total releases
- 25 / 9 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 3.5
- Download size
- 47 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("exampletestr")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.12688/wellcomeopenres.11635.2.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-17, which the citation names so these numbers can be found later. More on citing and the projects behind them.