set: Set operations for messy dates

setR Documentation

Set operations for messy dates

Description

Performs intersection (md_intersect()) and union (md_union()) on, inter alia, messy date class objects. For a more typical 'join' that retains all elements, even if duplicated, please use md_multiset.

Usage

md_intersect(...)

md_union(x, y)

md_multiset(x, y)

Arguments

x, y, ...

Messy date or other class objects

Value

A vector of the same mode for intersect, or a common mode for union.

Functions

  • md_intersect: Find intersection of sets of messy dates

  • md_union: Find union of sets of messy dates

  • md_multiset: Join two sets of messy dates

Examples

md_intersect(as_messydate("2012-01-01..2012-01-20"),as_messydate("2012-01"))
md_union(as_messydate("2012-01-01..2012-01-20"),as_messydate("2012-01"))
md_multiset(as_messydate("2012-01-01..2012-01-20"),as_messydate("2012-01"))

messydates documentation built on July 21, 2022, 5:11 p.m.