Learn R Programming

aion (version 1.6.0)

relations: Temporal Relations

Description

Test for the logical relation between time intervals according to Allen's typology.

Usage

precedes(x, ...)

preceded_by(x, ...)

meets(x, ...)

met_by(x, ...)

overlaps(x, ...)

overlapped_by(x, ...)

finishes(x, ...)

finished_by(x, ...)

contains(x, ...)

during(x, ...)

starts(x, ...)

started_by(x, ...)

equals(x, ...)

# S4 method for TimeIntervals precedes(x, ...)

# S4 method for TimeIntervals preceded_by(x, ...)

# S4 method for TimeIntervals meets(x, ...)

# S4 method for TimeIntervals met_by(x, ...)

# S4 method for TimeIntervals overlaps(x, ...)

# S4 method for TimeIntervals overlapped_by(x, ...)

# S4 method for TimeIntervals finishes(x, ...)

# S4 method for TimeIntervals finished_by(x, ...)

# S4 method for TimeIntervals contains(x, ...)

# S4 method for TimeIntervals during(x, ...)

# S4 method for TimeIntervals starts(x, ...)

# S4 method for TimeIntervals started_by(x, ...)

# S4 method for TimeIntervals equals(x, ...)

Value

A two-columns matrix where each row specifies one relation.

Arguments

x

A TimeIntervals object.

...

Currently not used.

Author

N. Frerebeau

Details

Allen (1983) proposed thirteen basic relations between time intervals that are (Alspaugh 2019):

  • Distinct: no pair of definite intervals can be related by more than one of the relationships.

  • Exhaustive: any pair of definite intervals are described by one of the relations.

  • Qualitative: no numeric time spans are considered.

RelationConverse
precedes(p)(P)preceded by
meets(m)(M)met by
overlaps(o)(O)overlapped by
finished by(F)(f)finishes
contains(D)(d)during
starts(s)(S)started by
equals(e)

A precedes B

A ===
B     ===

A preceded by B

A     ===
B ===

A meets B

A ===
B    ===

A met by B

A ===
B    ===

A overlaps B

A ===
B   ===

A overlapped by B

A   ===
B ===

A finished by B

A =====
B   ===

A finishes B

A   ===
B =====

A contains B

A =====
B  ===

A during B

A  ===
B =====

A starts B

A ===
B =====

A started by B

A =====
B ===

A equals B

A ===
B ===

References

Allen, J. F. (1983). Maintaining Knowledge about Temporal Intervals. Communications of the ACM, 26(11): 832-843. tools:::Rd_expr_doi("10.1145/182.358434").

Alspaugh, T. (2019). Allen's Interval Algebra. URL: https://thomasalspaugh.org/pub/fnd/allen.html.

See Also

Other temporal relations: overlap()

Examples

Run this code
## Seven intervals
int <- intervals(
  start = c(1, 2, 3, 6, 9, 13, 17),
  end = c(7, 4, 15, 14, 11, 18, 19),
  calendar = CE(),
  names = c("A", "B", "C", "D", "E", "F", "G")
)

## Plot intervals
plot(int)

## Temporal relations
precedes(int) # A precedes E...

overlaps(int) # A overlaps C...

contains(int) # A contains B...

Run the code above in your browser using DataLab