Merge two event sets
merge_event_sets.RdBoth sets' losses in each year: a catastrophe event set with a
non-catastrophe one, say. The sets need the same number of years. With
times on both, each year's losses are merged in time order (x's first on
a tie); with times on neither, x's losses come first. Sums insured are
kept when both sets carry them. Labels (with_labels()) are kept when
either carries them: x's dimensions, then y's new ones, with "" for
a loss without a value in a dimension.
Arguments
- x, y
event_set objects.
Value
An event_set.
Examples
cat <- event_set_from_long(1, 100, 2)
other <- event_set_from_long(c(1, 2), c(3, 5), 2)
events(merge_event_sets(cat, other), 1)
#> [1] 100 3