int_overlaps

0th

Percentile

Test if two intervals overlap

Test if two intervals overlap

Usage
int_overlaps(int1, int2)
Arguments
int1
an Interval object
int2
an Interval object
Value

Logical. TRUE if int1 and int2 overlap by at least one second. FALSE otherwise.

Aliases
  • int_overlaps
Examples
int1 <- interval(ymd("2001-01-01"), ymd("2002-01-01"))
# 2001-01-01 UTC--2002-01-01 UTC
int2 <- interval(ymd("2001-06-01"), ymd("2002-06-01"))
# 2001-06-01 UTC--2002-06-01 UTC
int3 <- interval(ymd("2003-01-01"), ymd("2004-01-01"))
# 2003-01-01 UTC--2004-01-01 UTC

int_overlaps(int1, int2) # TRUE
int_overlaps(int1, int3) # FALSE
Documentation reproduced from package lubridate, version 1.5.6, License: GPL-2

Community examples

Looks like there are no examples yet.