| discover_patterns | R Documentation |
Discovering various types of patterns in sequence data. Provides n-gram extraction, gapped pattern discovery, analysis of repeated patterns and targeted pattern search.
discover_patterns(
data,
type = "ngram",
pattern,
len = 2:5,
gap = 1:3,
min_support = 0.01,
min_count = 2,
start,
end,
contains
)
data |
[ |
type |
[
|
pattern |
[ |
len |
[ |
gap |
[ |
min_support |
[ |
min_count |
[ |
start |
[ |
end |
[ |
contains |
[ |
A tibble containing the discover patterns, counts, proportions,
and support.
# N-grams
ngrams <- discover_patterns(engagement, type = "ngram")
# Gapped patterns
gapped <- discover_patterns(engagement, type = "gapped")
# Repeated patterns
repeated <- discover_patterns(engagement, type = "repeated")
# Custom pattern with a wildcard state
custom <- discover_patterns(engagement, pattern = "Active->*")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.