contract: Contract lists of dates into messy dates

Description Usage Arguments Value Examples

View source: R/contract.R

Description

This function operates as the opposite of expand(). It contracts a list of dates into the abbreviated annotation of messy dates.

Usage

1

Arguments

x

A list of dates

Value

A messydt vector

Examples

1
2
3
4
d <- as_messydate(c("2001-01-01", "2001-01", "2001",
"2001-01-01..2001-02-02", "{2001-10-01,2001-10-04}", "{2001-01,2001-02-02}"))
e <- expand(d)
tibble::tibble(d, contract(e))

messydates documentation built on Nov. 12, 2021, 5:06 p.m.