View source: R/temporal_overlap.R
temporal_overlap | R Documentation |
This function calculates the temporal overlap of elements in sequences. It determines how much each element overlaps with other elements in the same sequence.
temporal_overlap(sequences_long)
sequences_long |
A data frame containing sequences with columns: sequence_nr, element, start_time, and end_time. |
A data frame summarizing the mean overlap elements and mean overlap proportion for each element.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.