degenerate_ngrams: Degenerate n-grams

Description Usage Arguments Value

View source: R/degenerate.R

Description

'Degenerates' n-grams by aggregating amino acid or nucleotide elements into bigger groups.

Usage

1
degenerate_ngrams(x, element_groups, binarize = FALSE)

Arguments

x

object containing n-grams.

element_groups

encoding of elements: list of groups to which elements of n-grams should be aggregated. Must have unique names.

binarize

logical indicating if n-grams should be binarized

Value

A character vector or matrix (if input is a matrix) containing degenerated n-grams.


biogram documentation built on March 31, 2020, 5:14 p.m.