Package: tidyfault 0.1.0

Timothy Fraser

tidyfault: Tidy Fault Tree Analysis

Fault tree analysis with tidy data. Represent a fault tree as two tables, one of nodes (the top event, gates and basic events) and one of edges, so the whole workflow stays in ordinary data frames. Derive the Boolean equation of the top event, enumerate the truth table, and find minimal cut sets with the Method of Obtaining Cut Sets (MOCUS) algorithm of Fussell and Vesely (1972), implemented in 'R' and, by default, in C++ through 'Rcpp'. Evaluate thousands of binary or probabilistic scenarios in one vectorized call, put uncertainty intervals around the top-event probability, follow it over time, and rank which component fix lowers it most. Lay out and draw the tree with 'tidygraph', 'igraph' and 'ggplot2'. Methods follow the "Fault Tree Handbook" of Vesely, Goldberg, Roberts and Haasl (1981) <https://www.nrc.gov/docs/ML1007/ML100780465.pdf>. A 'Python' port with the same functions ships in the same repository.

Authors:Timothy Fraser [aut, cre, cph], Jingyao Tong [aut, cph], Cornell University [cph]

tidyfault_0.1.0.tar.gz
tidyfault_0.1.0.zip(r-4.7-x86_64)tidyfault_0.1.0.zip(r-4.7-arm64)tidyfault_0.1.0.zip(r-4.6-x86_64)tidyfault_0.1.0.zip(r-4.6-arm64)
tidyfault_0.1.0.tar.gz(r-4.7-arm64)tidyfault_0.1.0.tar.gz(r-4.7-x86_64)tidyfault_0.1.0.tar.gz(r-4.6-arm64)tidyfault_0.1.0.tar.gz(r-4.6-x86_64)
tidyfault_0.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
tidyfault/json (API)

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

Bug tracker:https://github.com/timothyfraser/tidyfault/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • ai_edges - 'ai_edges' AI agent failure fault tree edge dataset
  • ai_nodes - 'ai_nodes' AI agent failure fault tree nodes dataset
  • ai_outcomes_binary - 'ai_outcomes_binary' AI agent failure fault tree binary scenarios
  • ai_outcomes_prob - 'ai_outcomes_prob' AI agent failure fault tree outcome probabilities
  • ai_outcomes_rates - 'ai_outcomes_rates' AI agent failure fault tree failure rates
  • ai_probs - 'ai_probs' AI agent failure fault tree event probabilities
  • breach_edges - 'breach_edges' data breach fault tree edge dataset
  • breach_nodes - 'breach_nodes' data breach fault tree nodes dataset
  • db_edges - 'db_edges' database system failure fault tree edge dataset
  • db_nodes - 'db_nodes' database system failure fault tree nodes dataset
  • db_outcomes_binary - 'db_outcomes_binary' database system failure fault tree binary scenarios
  • db_outcomes_prob - 'db_outcomes_prob' database system failure fault tree outcome probabilities
  • db_outcomes_rates - 'db_outcomes_rates' database system failure fault tree failure rates
  • db_probs - 'db_probs' database system failure fault tree event probabilities
  • fakeedges - 'fakeedges' fault tree edge dataset
  • fakenodes - 'fakenodes' fault tree nodes dataset
  • it_security_data - 'it_security_data' Binary scenario data for IT security fault tree
  • it_security_edges - 'it_security_edges' IT security (data leak) fault tree edge dataset
  • it_security_nodes - 'it_security_nodes' IT security (data leak) fault tree nodes dataset
  • it_security_outcomes_rates - 'it_security_outcomes_rates' IT security (data leak) fault tree failure rates
  • it_security_probs - 'it_security_probs' IT security (data leak) fault tree event probabilities
  • security_edges - 'security_edges' security breach fault tree edge dataset
  • security_nodes - 'security_nodes' security breach fault tree nodes dataset
  • security_outcomes_binary - 'security_outcomes_binary' security breach fault tree binary scenarios
  • security_outcomes_prob - 'security_outcomes_prob' security breach fault tree outcome probabilities
  • security_outcomes_rates - 'security_outcomes_rates' security breach fault tree failure rates
  • security_probs - 'security_probs' security breach fault tree event probabilities

On CRAN:

Conda:

cpp

4.04 score 44 scripts 27 exports 34 dependencies

Last updated from:cdc9318667. Checks:10 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK132
linux-devel-x86_64OK158
source / vignettesOK241
linux-release-arm64OK119
linux-release-x86_64OK134
windows-devel-arm64OK245
windows-devel-x86_64OK185
windows-release-arm64OK232
windows-release-x86_64OK133
wasm-releaseOK116

Exports:calculateconcentratecurateequateformulategategate_andgate_orgate_topget_gateillustratemocusmocus_cppmocus_rmocus_rcppplotpopulatequantifyquantify_binaryquantify_binary_fastquantify_ciquantify_ifquantify_probquantify_prob_fastquantify_whensimulatetabulate

Dependencies:clicpp11dplyrfarvergenericsggplot2gluegtableigraphisobandlabelinglatticelifecyclemagrittrMatrixpillarpkgconfigpurrrR6RColorBrewerRcpprlangS7scalesstringistringrtibbletidygraphtidyrtidyselectutf8vctrsviridisLitewithr

Core workflow
Represent the fault tree | Pipeline overview | Gates table: curate() | Boolean equation: equate() | Executable structure: formulate() | Optional: full truth table with calculate() | Minimal cutsets: concentrate() and tabulate() | Summary

Last update: 2026-10-24
Started: 2026-10-24

quantify()-ing binary outcomes
Setup: formulate the top event | Single scenario: direct function call | Many scenarios: quantify() on a data frame | Batch evaluation: IT security tree | Why vectorize? | Summary

Last update: 2026-10-24
Started: 2026-10-24

quantify()-ing probabilities
Database example: populate() then quantify() | IT security: rates to cumulative probabilities over time | Summary

Last update: 2026-10-24
Started: 2026-10-24

Simulating uncertainty
Model and bundled data | Simulate uncertainty in failure rates | Summarize the top-event distribution | Interpretation

Last update: 2026-10-24
Started: 2026-10-24

Visualizing fault trees
Database example | What illustrate() returns | IT security example (larger tree) | Workflow tip | Related reference

Last update: 2026-10-24
Started: 2026-10-24

Readme and manuals

Help Manual

Help pageTopics
'ai_edges' AI agent failure fault tree edge datasetai_edges
'ai_nodes' AI agent failure fault tree nodes datasetai_nodes
'ai_outcomes_binary' AI agent failure fault tree binary scenariosai_outcomes_binary
'ai_outcomes_prob' AI agent failure fault tree outcome probabilitiesai_outcomes_prob
'ai_outcomes_rates' AI agent failure fault tree failure ratesai_outcomes_rates
'ai_probs' AI agent failure fault tree event probabilitiesai_probs
'breach_edges' data breach fault tree edge datasetbreach_edges
'breach_nodes' data breach fault tree nodes datasetbreach_nodes
Enumerate the truth table of a fault treecalculate
Find the minimal cut setsconcentrate
Build the gates table from nodes and edgescurate
'db_edges' database system failure fault tree edge datasetdb_edges
'db_nodes' database system failure fault tree nodes datasetdb_nodes
'db_outcomes_binary' database system failure fault tree binary scenariosdb_outcomes_binary
'db_outcomes_prob' database system failure fault tree outcome probabilitiesdb_outcomes_prob
'db_outcomes_rates' database system failure fault tree failure ratesdb_outcomes_rates
'db_probs' database system failure fault tree event probabilitiesdb_probs
Write the Boolean equation of the top eventequate
'fakeedges' fault tree edge datasetfakeedges
'fakenodes' fault tree nodes datasetfakenodes
Turn the Boolean equation into an R functionformulate
Draw gate polygons for a nodes tablegate
Polygon for an AND gategate_and
Polygon for an OR gategate_or
Polygon for a top-event gategate_top
Place one gate polygon at x, yget_gate
Lay out a fault tree for plottingillustrate
'it_security_data' Binary scenario data for IT security fault treeit_security_data
'it_security_edges' IT security (data leak) fault tree edge datasetit_security_edges
'it_security_nodes' IT security (data leak) fault tree nodes datasetit_security_nodes
'it_security_outcomes_rates' IT security (data leak) fault tree failure ratesit_security_outcomes_rates
'it_security_probs' IT security (data leak) fault tree event probabilitiesit_security_probs
Cut sets by the MOCUS algorithmmocus
MOCUS in pure Rmocus_r
MOCUS with the C++ backendmocus_cpp mocus_rcpp
Plot a fault tree from illustrate() outputplot plot.tidyfault_tree
Fill a binary scenario table with event probabilitiespopulate
Evaluate the top event for many scenariosquantify
Uncertainty interval for the top-event probabilityquantify_ci
Which fix buys the mostquantify_if
Top-event probability from event probabilitiesquantify_prob
Top-event probability in one vectorized passquantify_prob_fast
Top-event probability over timequantify_when
'security_edges' security breach fault tree edge datasetsecurity_edges
'security_nodes' security breach fault tree nodes datasetsecurity_nodes
'security_outcomes_binary' security breach fault tree binary scenariossecurity_outcomes_binary
'security_outcomes_prob' security breach fault tree outcome probabilitiessecurity_outcomes_prob
'security_outcomes_rates' security breach fault tree failure ratessecurity_outcomes_rates
'security_probs' security breach fault tree event probabilitiessecurity_probs
Simulate a random fault treesimulate
Coverage of each minimal cut settabulate