TransMx: Transition matrices in one group of strings

View source: R/TransMx.R

TransMxR Documentation

Transition matrices in one group of strings

Description

TransMx discovers transition matrix of a string vector and the related information.

A transition is defined as a substring (in the forward order) with length of 2 characters. It can be considered as a special common pattern (length of 2).

Usage

TransMx(strings.vec)

Arguments

strings.vec

String Vector.

If a string has fewer than 2 characters, that string will be ignored.

Value

The function returns a list, which contains the transition matrix, the normalized matrix, and the sorted numbers of transitions.

Note

Strings with less than 2 characters are not included due to the definition of transition.

See Also

TransInfo

Examples

# simple strings
strs.vec <- c("ABCDdefABCDa", "def123DC", "123aABCD", "ACD13", "AC1ABC", "3123fe")
TransMx(strs.vec)

GrpString documentation built on Feb. 24, 2026, 9:06 a.m.