The union of two or more supports: everything covered by any of them.
Arguments
- ...
Supports to combine, or a single list of them. Distributions are accepted in place of supports. With no arguments, the result is
empty_support(), which is the identity for this operation.If any of them has no support — a
NULL, ordst_null()— the result isNULL. A union cannot be known when one of the things being combined is not.
Details
The atomic parts are unioned as series, and the continuous parts are pooled and merged back into canonical form, so touching or overlapping intervals come out as one.
An atom that falls inside another support's continuous part stays an atom. The two carry different kinds of probability, and one does not absorb the other.
See also
support_restrict() to cut a support down instead.
Other Support algebra:
support_add_atoms(),
support_contains(),
support_restrict(),
support_transform()
Examples
support_union(continuous(c(0, 1)), continuous(c(0.5, 3)))
#> <support: continuous>
#> -- continuous --
#> [0, 3]
support_union(discrete(c(1, 2)), continuous(c(5, 6)))
#> <support: mixed>
#> -- atoms --
#> Numeric vector series of length 2:
#> 1, 2
#> -- continuous --
#> [5, 6]
# The identity.
support_union()
#> <support: empty>
