localScore (version 1.0.6)

scoreSequences2probabilityVector: Empirical distribution from sequences

Description

Builds empirical distribution from a list of numerical sequences

Usage

scoreSequences2probabilityVector(sequences)

Arguments

sequences

list of numerical sequences

Value

empirical distribution from minimum score to maximum score as a vector of floating numbers.

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.

Examples

Run this code
# NOT RUN {
seq1 = sample(7:8, size = 10, replace = TRUE)
seq2 = sample(2:3, size = 15, replace = TRUE)
l = list(seq1, seq2)
scoreSequences2probabilityVector(l)
# }

Run the code above in your browser using DataLab