int_flip {lubridate}R Documentation

Flip the direction of an interval

Description

Reverses the order of the start date and end date in an interval. The new interval takes place during the same timespan as the original interval, but has the opposite direction.

Usage

int_flip(int)

Arguments

int

An interval object

Value

An interval object

See Also

int_shift, int_start, int_end, int_length

Examples

int <- interval(ymd("2001-01-01"), ymd("2002-01-01"))
# 2001-01-01 UTC--2002-01-01 UTC
int_flip(int)
# 2002-01-01 UTC--2001-01-01 UTC

[Package lubridate version 1.5.6 Index]