temporal_overlap {AnimalSequences} | R Documentation |
Temporal Overlap
Description
This function calculates the temporal overlap of elements in sequences. It determines how much each element overlaps with other elements in the same sequence.
Usage
temporal_overlap(sequences_long)
Arguments
sequences_long |
A data frame containing sequences with columns: sequence_nr, element, start_time, and end_time. |
Value
A data frame summarizing the mean overlap elements and mean overlap proportion for each element.
Examples
sequences_long <- data.frame(
sequence_nr = c(1, 1, 1, 2, 2),
element = c("A", "B", "C", "A", "B"),
start_time = c(0, 5, 10, 0, 5),
end_time = c(5, 10, 15, 5, 10)
)
result <- temporal_overlap(sequences_long)
print(result)
[Package AnimalSequences version 0.2.0 Index]