special_or_lists: OR two lists together with some regards for nesting

Description Usage Arguments Details Value See Also

Description

The structure of the lists should be the same. That is, as a tree, the two lists should be isomorphic. For example, special_or_lists(list(a = FALSE, b = list(b = TRUE, c = FALSE)), list(a = FALSE, b = list(b = FALSE, c = TRUE))) yields list(a = FALSE, b = list(b = TRUE, c = TRUE)) and special_or_lists(list(a = FALSE, b = list(b = TRUE, c = FALSE)), list(a = list(b = FALSE, c = TRUE), b = FALSE)) yields list(a = list(b = FALSE, c = TRUE), b = list(b = TRUE, c = FALSE))

Usage

1
special_or_lists(list1, list2)

Arguments

list1

a list.

list2

a list.

Details

Note that lists get ORed based on *order*, not on key names (as this could be ambiguous), so make sure the two lists have the same comparable key orders. For example, special_or_lists(list(a = TRUE, b = FALSE), list(b = FALSE, a = TRUE)) would mistakenly return list(a = TRUE, b = TRUE).

Value

the or'ed list.

See Also

special_and_lists


syberia/stagerunner documentation built on May 30, 2019, 10:41 p.m.