UniPatterns: Discovers unique patterns in two groups of strings

View source: R/UniPatterns.R

UniPatternsR Documentation

Discovers unique patterns in two groups of strings

Description

UniPatterns discovers "unique" patterns that are in one group of strings but not the other.

Usage

UniPatterns(grp1_pattern, grp2_pattern, grp1_string, grp2_string)

Arguments

grp1_pattern

Patterns shared by a certain percent of strings in string group 1.

grp2_pattern

Patterns shared by a certain percent of strings in string group 2.

grp1_string

String group 1.

grp2_string

String group 2.

Details

A (common) pattern is defined as a substring with the minimum length of three that occurs at least twice among a group of strings.

A unique pattern is a pattern that appears in only one of the two groups of strings.

Value

The function exports a data frame that lists unique patterns: column 1 for string group 1; column 2 for string group 2.

See Also

PatternInfo, CommonPatt, CommonPattern

Examples

data(str1)
data(str2)
data(p1_20up)
data(p2_25up)
UniPatterns(p1_20up, p2_25up, str1, str2)

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