View source: R/simplify_rules.R
simplify_rules | R Documentation |
Simplifies a rule set set by applying different simplification methods. This is a convenience function that works in common cases. The following simplification methods are executed:
substitute_values
: filling in any parameters that are supplied via .values
or ...
.
simplify_fixed_variables
: find out if there are fixed values. If this is the case, they are substituted.
simplify_conditional
: Simplify conditional statements, by removing clauses that are superfluous.
remove_redundancy
: remove redundant rules.
For more control, these methods can be called separately.
simplify_rules(.x, .values = list(...), ...)
.x |
|
.values |
optional named list with values that will be substituted. |
... |
parameters that will be used to substitute values. |
Other redundancy:
detect_fixed_variables()
,
detect_redundancy()
,
is_implied_by()
,
remove_redundancy()
,
simplify_fixed_variables()
rules <- validator( x > 0
, if (x > 0) y == 1
, A %in% c("a1", "a2")
, if (A == "a1") y > 1
)
simplify_rules(rules)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.