Description Usage Arguments Details Value Examples
Extracts vector of n-grams present in sequence(s).
1 | seq2ngrams(seq, n, u, d = 0, pos = FALSE)
|
seq |
a vector or matrix describing sequence(s). |
n |
|
u |
|
d |
|
pos |
|
A format of d
vector is discussed in Details of
count_ngrams
.
A character
matrix of n-grams, where every row corresponds to a
different sequence.
1 2 3 |
Loading required package: slam
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] "3.2.1_0.0" "2.1.1_0.0" "1.1.3_0.0" "1.3.3_0.0" "3.3.1_0.0" "3.1.4_0.0"
[2,] "2.1.3_0.0" "1.3.3_0.0" "3.3.2_0.0" "3.2.2_0.0" "2.2.2_0.0" "2.2.1_0.0"
[3,] "2.1.3_0.0" "1.3.3_0.0" "3.3.4_0.0" "3.4.4_0.0" "4.4.1_0.0" "4.1.1_0.0"
[4,] "1.3.1_0.0" "3.1.4_0.0" "1.4.4_0.0" "4.4.1_0.0" "4.1.1_0.0" "1.1.2_0.0"
[5,] "3.2.3_0.0" "2.3.2_0.0" "3.2.4_0.0" "2.4.2_0.0" "4.2.4_0.0" "2.4.3_0.0"
[6,] "1.3.3_0.0" "3.3.3_0.0" "3.3.3_0.0" "3.3.4_0.0" "3.4.4_0.0" "4.4.1_0.0"
[7,] "4.3.2_0.0" "3.2.3_0.0" "2.3.2_0.0" "3.2.4_0.0" "2.4.4_0.0" "4.4.3_0.0"
[8,] "2.1.2_0.0" "1.2.3_0.0" "2.3.4_0.0" "3.4.1_0.0" "4.1.4_0.0" "1.4.2_0.0"
[9,] "3.2.1_0.0" "2.1.4_0.0" "1.4.1_0.0" "4.1.4_0.0" "1.4.2_0.0" "4.2.3_0.0"
[10,] "1.4.2_0.0" "4.2.4_0.0" "2.4.2_0.0" "4.2.4_0.0" "2.4.4_0.0" "4.4.3_0.0"
[11,] "2.3.1_0.0" "3.1.4_0.0" "1.4.2_0.0" "4.2.1_0.0" "2.1.2_0.0" "1.2.2_0.0"
[12,] "1.4.4_0.0" "4.4.1_0.0" "4.1.4_0.0" "1.4.2_0.0" "4.2.2_0.0" "2.2.3_0.0"
[,7] [,8] [,9] [,10] [,11] [,12]
[1,] "1.4.4_0.0" "4.4.1_0.0" "4.1.1_0.0" "1.1.1_0.0" "1.1.3_0.0" "1.3.2_0.0"
[2,] "2.1.3_0.0" "1.3.2_0.0" "3.2.1_0.0" "2.1.4_0.0" "1.4.3_0.0" "4.3.1_0.0"
[3,] "1.1.1_0.0" "1.1.3_0.0" "1.3.3_0.0" "3.3.2_0.0" "3.2.4_0.0" "2.4.3_0.0"
[4,] "1.2.2_0.0" "2.2.1_0.0" "2.1.1_0.0" "1.1.3_0.0" "1.3.3_0.0" "3.3.2_0.0"
[5,] "4.3.1_0.0" "3.1.4_0.0" "1.4.4_0.0" "4.4.1_0.0" "4.1.3_0.0" "1.3.4_0.0"
[6,] "4.1.1_0.0" "1.1.3_0.0" "1.3.2_0.0" "3.2.3_0.0" "2.3.4_0.0" "3.4.2_0.0"
[7,] "4.3.4_0.0" "3.4.3_0.0" "4.3.3_0.0" "3.3.4_0.0" "3.4.3_0.0" "4.3.4_0.0"
[8,] "4.2.4_0.0" "2.4.4_0.0" "4.4.2_0.0" "4.2.2_0.0" "2.2.3_0.0" "2.3.3_0.0"
[9,] "2.3.3_0.0" "3.3.1_0.0" "3.1.4_0.0" "1.4.4_0.0" "4.4.4_0.0" "4.4.1_0.0"
[10,] "4.3.3_0.0" "3.3.4_0.0" "3.4.3_0.0" "4.3.4_0.0" "3.4.3_0.0" "4.3.2_0.0"
[11,] "2.2.2_0.0" "2.2.3_0.0" "2.3.1_0.0" "3.1.4_0.0" "1.4.3_0.0" "4.3.1_0.0"
[12,] "2.3.3_0.0" "3.3.4_0.0" "3.4.3_0.0" "4.3.1_0.0" "3.1.4_0.0" "1.4.4_0.0"
[,13] [,14] [,15] [,16] [,17] [,18]
[1,] "3.2.2_0.0" "2.2.4_0.0" "2.4.1_0.0" "4.1.3_0.0" "1.3.3_0.0" "3.3.2_0.0"
[2,] "3.1.1_0.0"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1.3_0.0" "1.3.4_0.0" "3.4.2_0.0"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.