cueCoding {ndl} | R Documentation |
cueCoding
codes a vector of cues into unigrams, bigrams,
..., n-grams, with unigrams as default.
cueCoding(cues = c("hello", "world"), maxn=1, adjacent=FALSE)
cues |
A vector of cues (represented by strings) to be recoded as unigrams, bigrams, ..., ngrams. |
maxn |
The longest n-gram to be encoded, by default |
adjacent |
A logical indicating whether only adjacent bigrams should be
included when |
A vector of cue n-grams, one for each word in the input
vector cues
. Each n-gram vector lists the constituent unigrams,
bigrams, etc., separated by underscores.
Antti Arppe and Harald Baayen
Arppe, A. and Baayen, R. H. (in prep.). Statistical classification and principles of human learning.
See also ndlClassify, ndlCuesOutcomes,
ndlVarimp, ndlCrossvalidate
.
# Cues from the \code{think} data: Person, Number, Register
cues <- c("First", "Plural", "hs95")
cueCoding(cues, maxn=1)
cueCoding(cues, maxn=2)