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

e1 %intersect% e2

## S3 method for class 'mdate'
e1 %intersect% e2

e1 %union% e2

## S3 method for class 'mdate'
e1 %union% e2

Arguments

e1, e2

Messy date or other class objects

Value

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

Functions

  • %intersect% : Find intersection of sets of messy dates

  • %union% : Find intersection of sets of messy dates

Examples

as_messydate("2012-01-01..2012-01-20") %intersect% as_messydate("2012-01")
as_messydate("2012-01-01..2012-01-20") %union% as_messydate("2012-01")

messydates documentation built on May 29, 2024, 2:16 a.m.