seqVectorAlphabetFrequency {XNAString} | R Documentation

## seqVectorAlphabetFrequency function calculates frequency for strings vector

### Description

seqVectorAlphabetFrequency function calculates frequency for strings vector

### Usage

    seqVectorAlphabetFrequency(unique_letters, seq_vec, as.prob)

### Arguments

`unique_letters` | string (or character) - these letters pose column names
`seq_vec` | vector of strings (or characters) - frequency will be calculated for this vector
`as.prob` | logical - if TRUE frequency returned as probability of occurence

### Value

matrix - each row denotes frequency for a specific string of vector

### Examples

    seqVectorAlphabetFrequency(c("A", "B", "C"),
      c("AABA", "BBBCCC"),
      as.prob = FALSE
    )

[Package XNAString version 1.2.2 Index]