Package: attempt 0.3.0

attempt: Tools for Defensive Programming

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.

Authors:Colin Fay [aut, cre]

attempt_0.3.0.tar.gz
attempt_0.3.0.zip(r-4.5)attempt_0.3.0.zip(r-4.4)attempt_0.3.0.zip(r-4.3)
attempt_0.3.0.tgz(r-4.4-any)attempt_0.3.0.tgz(r-4.3-any)
attempt_0.3.0.tar.gz(r-4.5-noble)attempt_0.3.0.tar.gz(r-4.4-noble)
attempt_0.3.0.tgz(r-4.4-emscripten)attempt_0.3.0.tgz(r-4.3-emscripten)
attempt.pdf |attempt.html
attempt/json (API)
NEWS

# Install 'attempt' in R:
install.packages('attempt', repos = c('https://colinfay.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/colinfay/attempt/issues

On CRAN:

36 exports 124 stars 11.45 score 1 dependencies 79 dependents 100 scripts 6.4k downloads

Last updated 2 months agofrom:7558eaefdf. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 22 2024
R-4.5-winOKSep 22 2024
R-4.5-linuxOKSep 22 2024
R-4.4-winOKSep 22 2024
R-4.4-macOKSep 22 2024
R-4.3-winOKSep 22 2024
R-4.3-macOKSep 22 2024

Exports:attemptdiscretlyif_allif_anyif_elseif_noneif_notif_thenis_try_errormap_try_catchmap_try_catch_dfmessage_ifmessage_if_allmessage_if_anymessage_if_nonemessage_if_noton_errorsilent_attemptsilentlystop_ifstop_if_allstop_if_anystop_if_nonestop_if_notsurelytry_catchtry_catch_dfwarn_ifwarn_if_allwarn_if_anywarn_if_nonewarn_if_notwith_messagewith_warningwithout_messagewithout_warning

Dependencies:rlang

Adverbs

Rendered fromc_adverbs.Rmdusingknitr::rmarkdownon Sep 22 2024.

Last update: 2022-12-14
Started: 2018-01-30

Condition handling

Rendered frome_conditions.Rmdusingknitr::rmarkdownon Sep 22 2024.

Last update: 2022-12-14
Started: 2018-01-30

Tests and Coverage

Rendered fromtests_and_coverage.Rmdusingknitr::rmarkdownon Sep 22 2024.

Last update: 2019-04-03
Started: 2019-04-03

If

Rendered fromd_if.Rmdusingknitr::rmarkdownon Sep 22 2024.

Last update: 2022-12-14
Started: 2018-01-30

attempt

Rendered froma_intro_attempt.Rmdusingknitr::rmarkdownon Sep 22 2024.

Last update: 2019-04-08
Started: 2018-01-30

Try Catch

Rendered fromb_try_catch.Rmdusingknitr::rmarkdownon Sep 22 2024.

Last update: 2022-12-14
Started: 2018-01-30

Readme and manuals

Help Manual

Help pageTopics
attempt packageattempt-package
Attemptattempt
discretlydiscretly
Test for all, any or noneif_all if_any if_none
If this, then thatif_else if_not if_then
Is the element of class "try-error"?is_try_error
Add a function to be run on erroron_error
Silently attemptsilent_attempt
Silentlysilently
Warn ifmessage_if message_if_all message_if_any message_if_none message_if_not stop_if stop_if_all stop_if_any stop_if_none stop_if_not warn_if warn_if_all warn_if_any warn_if_none warn_if_not
surelysurely
Try Catchmap_try_catch map_try_catch_df try_catch try_catch_df
Manipulate messages and warningswithout_message without_warning with_message with_warning