View source: R/element_duration.R
element_duration | R Documentation |
This function calculates the individual element durations and compares them to a shuffled distribution.
element_duration(sequences_long, n_permutations = 1000)
sequences_long |
A data frame containing sequences with start and end times for each element. |
n_permutations |
An integer specifying the number of permutations to perform. Default is 1000. |
A data frame with the median duration, standard deviation, expected duration, effect size, and p-value for each element.
# Example usage:
sequences_long <- data.frame(
element = c("A", "B", "C", "A", "B", "C"),
start_time = c(0, 5, 10, 15, 20, 25),
end_time = c(5, 10, 15, 20, 25, 30)
)
result <- element_duration(sequences_long, n_permutations = 100)
print(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.