Description Usage Arguments Details Value See Also Examples
The structure of the lists should be the same. That is,
as a tree, the two lists should be isomorphic. For example,
special_and_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 = FALSE, c = TRUE))
and
special_and_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))
1 | special_and_lists(list1, list2)
|
list1 |
a list. |
list2 |
a list. |
Note that lists get ANDed 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_and_lists(list(a = TRUE, b = FALSE), list(b = FALSE, a = TRUE))
would mistakenly return list(a = TRUE, b = TRUE)
.
the and'ed list.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
stopifnot(identical(
special_and_lists(list(a = FALSE, b = list(b = TRUE, c = FALSE)),
list(a = FALSE, b = list(b = FALSE, c = TRUE))),
list(a = FALSE, b = list(b = FALSE, c = TRUE))
))
stopifnot(identical(
special_and_lists(list(a = FALSE, b = list(b = TRUE, c = FALSE)),
list(a = list(b = FALSE, c = TRUE), b = FALSE)),
list(a = list(b = FALSE, c = TRUE), b = list(b = TRUE, c = FALSE))
))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.