Skip to contents

Filter the results of validation to show only broken rules, optionally including successful decisions.

Usage

rules_broken(results, show_decision)

Arguments

results

A data frame with validation results.

show_decision

A logical value to indicate if successful decisions should be included in the output.

Value

A data frame with the filtered results.

Examples

# Sample validation results data frame
sample_results <- data.frame(
  description = c("Rule 1", "Rule 2", "Rule 3"),
  status = c("error", "success", "error"),
  name = c("rule1", "rule2", "rule3"),
  expression = c("col1 > 0", "col2 <= 5", "col3 != 10"),
  stringsAsFactors = FALSE
)

# Show only broken rules
broken_rules <- rules_broken(sample_results, show_decision = FALSE)