Package: assertr 3.0.1

Tony Fischetti

assertr: Assertive Programming for R Analysis Pipelines

Provides functionality to assert conditions that have to be met so that errors in data used in analysis pipelines can fail quickly. Similar to 'stopifnot()' but more powerful, friendly, and easier for use in pipelines.

Authors:Tony Fischetti [aut, cre]

assertr_3.0.1.tar.gz
assertr_3.0.1.zip(r-4.5)assertr_3.0.1.zip(r-4.4)assertr_3.0.1.zip(r-4.3)
assertr_3.0.1.tgz(r-4.4-any)assertr_3.0.1.tgz(r-4.3-any)
assertr_3.0.1.tar.gz(r-4.5-noble)assertr_3.0.1.tar.gz(r-4.4-noble)
assertr_3.0.1.tgz(r-4.4-emscripten)assertr_3.0.1.tgz(r-4.3-emscripten)
assertr.pdf |assertr.html
assertr/json (API)
NEWS

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

Peer review:

Bug tracker:https://github.com/ropensci/assertr/issues

On CRAN:

analysis-pipelineassertion-libraryassertion-methodsassertionspeer-reviewedpredicate-functions

37 exports 464 stars 7.42 score 17 dependencies 11 dependents 1.6k downloads

Last updated 2 months agofrom:e484665dba582582faa343d97a09d4a097db3bb1 (via master)

Exports:assertassert_rowschain_endchain_startcol_concatdefect_appenddefect_df_returndefect_reportduplicates_across_colserror_appenderror_df_returnerror_logicalerror_reporterror_returnerror_stophas_all_nameshas_classhas_only_namesin_setinsistinsist_rowsis_uniqjust_warnmaha_distnot_nanum_row_NAssuccess_appendsuccess_continuesuccess_df_returnsuccess_logicalsuccess_reportverifywarn_reportwarning_appendwithin_boundswithin_n_madswithin_n_sds

Dependencies:clidplyrfansigenericsgluelifecyclemagrittrMASSpillarpkgconfigR6rlangtibbletidyselectutf8vctrswithr

Assertive R Programming with assertr

Rendered fromassertr.Rmdusingknitr::rmarkdownon Jun 11 2024.

Last update: 2021-01-28
Started: 2015-01-20

Readme and manuals

Help Manual

Help pageTopics
Raises error if predicate is FALSE in any columns selectedassert
Raises error if predicate is FALSE for any row after applying row reduction functionassert_rows
assertr: Assertive programming for R analysis pipeline.assertr-package assertr
Chaining functionschaining_functions chain_end chain_start
Concatenate all columns of each row in data frame into a stringcol_concat
Checks if row contains at least one value duplicated in its columnduplicates_across_cols
Generates random ID stringgenerate_id
Returns TRUE if data.frame or list has specified nameshas_all_names
Returns TRUE if data.frame columns have a specified classhas_class
Returns TRUE if data.frame or list has only the specified nameshas_only_names
Returns TRUE if value in setin_set
Raises error if dynamically created predicate is FALSE in any columns selectedinsist
Raises error if dynamically created predicate is FALSE for any row after applying row reduction functioninsist_rows
Returns TRUE where no elements appear more than onceis_uniq
Computes mahalanobis distance for each row of data framemaha_dist
Returns TRUE if value is not NAnot_na
Counts number of NAs in each rownum_row_NAs
Printing assertr's assert errorsprint.assertr_assert_error
Printing assertr's defectprint.assertr_defect
Printing assertr's successprint.assertr_success
Printing assertr's verify errorsprint.assertr_verify_error
Success and error functionsdefect_append defect_df_return defect_report error_append error_df_return error_logical error_report error_return error_stop just_warn success_and_error_functions success_append success_continue success_df_return success_logical success_report warning_append warn_report
Summarizing assertr's assert errorssummary.assertr_assert_error
Summarizing assertr's verify errorssummary.assertr_verify_error
Raises error if expression is FALSE anywhereverify
Creates bounds checking predicatewithin_bounds
Return a function to create robust z-score checking predicatewithin_n_mads
Return a function to create z-score checking predicatewithin_n_sds