Decouple a set of conditional edits

Share:

Description

An editset is transformed to a list of editsets which do not contain any conditional numeric/categorical edits anymore. Each editset gains an attribute condition, which holds the series of assumptions made to decouple the original edits. This attribute will be printed when not NULL. Warning: this may be slow for large, highly entangled sets of edits.

Usage

1
disjunct(E, type = c("list", "env"))

Arguments

E

Object of class editset

type

Return type: list (default) for editlist, env for editenv.

Value

An object of class editlist (editenv), which is nothing more than a list (environment) of editsets with a class attribute. Each element has an attribute 'condition' showing which conditions were assumed to derive the editset.

See Also

separate, condition, blocks

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
E <- editset(expression(
    x + y == z,
    if ( x > 0 ) y > 0,
    x >= 0,
    y >= 0,
    z >= 0,
    A %in% letters[1:4],
    B %in% letters[1:4],
    if (A %in% c('a','b')) y > 0,
    if (A == 'c' ) B %in% letters[1:3]
))

disjunct(E)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.