Tools for Defensive Programming
Overview
Tools for defensive programming, inspired by 'purrr' mappers and based on 'rlang'.'attempt' extends and facilitates defensive programming by providing a consistent grammar, and provides a set of easy to use functions for common tests and conditions. 'attempt' only depends on 'rlang', and focuses on speed, so it can be easily integrated in other functions and used in data analysis.
discretly()is now aliaseddiscreetly
From NEWS.md in the release
Install
Health
NOTER code for possible problemsr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64
Found calls to structure() using deprecated special names: attempt/R/try_catch.R (.Names: 1) '.Names' should be changed to 'names'.
- NOTE8 OK, 5 NOTE2026-09-08
- ERROR8 OK, 4 NOTE, 1 ERROR2026-09-07
- NOTE11 OK, 2 NOTE2026-07-16
- OK12 OK2026-04-25
- NOTE11 OK, 3 NOTE2026-03-10
Documentation
- Help pages
- 13includes a package overview page
- Examples that run
- 42%5 run in a plain check · 7 never run
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 75%
- Help pages citing references
- 0%
- Adverbs HTML
- Condition handling HTML
- If HTML
- Intro to attempt HTML
- Try Catch HTML
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 1
- Median days to close, 50 most recently updated closed PRs
- 1
Stars over time
Forks over time
Issues over time
PRs over time
9 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/colinfay/attempt on 2026-10-22.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-01-30
Show all practicesHide 2 practices
Dependencies
Installing attempt adds 1 package (1 with compiled code, 766 KB of source tarballs). Heaviest: rlang 766 KB.
Show all 19 packagesHide all 19 packages
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
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- 0.3.1Latest
- RR 4.0.0 released · 2020-04-24
- RR 3.6.0 released · 2019-04-26
- 0.3.0
- RR 3.5.0 released · 2018-04-23
- 0.2.1
- 0.2.0
- 0.1.02018-01-03
- RR 3.4.0 released · 2017-04-21
Package metadata
- First published
- 2018-01-03
- Total releases
- 5 / 8 yrs
- License
- MIT + file LICENSE OSI
- Download size
- 77 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("attempt")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-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.