Learn R Programming

ArchaeoPhases (version 2.1.0)

allen_complement: Complement of an Allen Relation

Description

Complement of an Allen Relation

Usage

allen_complement(x, ...)

# S4 method for character allen_complement(x)

# S4 method for matrix allen_complement(x)

Value

A character vector or matrix (same as x).

Arguments

x

A character vector or matrix of Allen relations (typically returned by allen_relation()).

...

Currently not used.

Author

T. S. Dye, N. Frerebeau

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").

See Also

Other Allen's intervals: allen_analyze(), allen_analyze_relations(), allen_composition(), allen_converse(), allen_illustrate(), allen_illustrate_relations(), allen_intersect(), allen_joint_concurrency(), allen_observe(), allen_observe_frequency(), allen_plot(), allen_relation(), allen_relation_code(), allen_union()

Examples

Run this code
## Data from Husi 2022
loire <- data.frame(
  lower = c(625, 700, 1200, 1225, 1250, 500, 1000, 1200,
            1325, 1375, 1200, 1300, 1375, 1275, 1325),
  upper = c(750, 825, 1250, 1275, 1325, 700, 1300, 1325,
            1400, 1500, 1300, 1375, 1500, 1325, 1425)
)

## Basic relations
allen_relation(loire$lower, loire$upper)

## Complement
(comp <- allen_complement("F")) # "pmoDseSdfOMP"

## Converse
(conv <- allen_converse(comp)) # "pmoFDseSdOMP"

## Composition
allen_composition("oFD", "oFDseS") # "pmoFD"

## Intersection
allen_intersect("pFsSf", "pmoFD") # "pF"

# Union
allen_union("pFsSf", "pmoFD") # "pmoFDsSf"

Run the code above in your browser using DataLab