element_position {AnimalSequences} | R Documentation |
Calculate Median Position of Each Element in Sequences
Description
This function calculates the median position of each element across sequences, summarizes the distribution, and compares it to a shuffled distribution.
Usage
element_position(sequences, n_permutations = 1000)
Arguments
sequences |
A character vector of sequences to analyze. |
n_permutations |
The number of permutations to use for the null distribution. |
Value
A data frame with the median position, standard deviation, expected position, effect size, and p-value for each element.
Examples
# Example usage:
sequences <- c("A B C", "A B", "A C", "B C", "A B C D")
result <- element_position(sequences)
print(result)
[Package AnimalSequences version 0.2.0 Index]