scoreSequences2probabilityVector {localScore} | R Documentation |
Empirical distribution from sequences
Description
Builds empirical distribution from a list of numerical sequences
Usage
scoreSequences2probabilityVector(sequences)
Arguments
sequences |
list of numerical sequences |
Details
By determining the extreme scores in the sequences, this function creates a vector of probabilities including values that do not occur at all. In this it differs from table(). For example, two sequences containing values from 1:2 and 5:6 will produce a vector of size 6.
Value
empirical distribution from minimum score to maximum score as a vector of floating numbers.
Examples
seq1 = sample(7:8, size = 10, replace = TRUE)
seq2 = sample(2:3, size = 15, replace = TRUE)
l = list(seq1, seq2)
scoreSequences2probabilityVector(l)
[Package localScore version 1.0.11 Index]