ngram {EnvNJ} R Documentation

## Compute n-Gram Frequencies Vector

### Description

Computes the n-gram frequencies vector for a given protein.

### Usage

ngram(prot, k = 4)


### Arguments

 prot a character string corresponding to the primary structure of the protein. k a positive integer, between 1 and 5, indicating the k-mer of the words to be counted.

### Details

The one letter code for amino acids is used (capital).

### Value

A dataframe with two columns, the first one given the peptides and the second one the corresponding absolute frequency.

### References

Stuart et al. Bioinformatics 2002; 18:100-108.

ngram(bovids\$Bos_taurus[1], k = 3)