cueCoding {ndl} | R Documentation |
code a vector of cues as n-grams
Description
cueCoding
codes a vector of cues into unigrams, bigrams,
..., n-grams, with unigrams as default.
Usage
cueCoding(cues = c("hello", "world"), maxn=1, adjacent=FALSE)
Arguments
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 |
Value
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.
Author(s)
Antti Arppe and Harald Baayen
References
Arppe, A. and Baayen, R. H. (in prep.). Statistical classification and principles of human learning.
See Also
See also ndlClassify, ndlCuesOutcomes,
ndlVarimp, ndlCrossvalidate
.
Examples
# Cues from the \code{think} data: Person, Number, Register
cues <- c("First", "Plural", "hs95")
cueCoding(cues, maxn=1)
cueCoding(cues, maxn=2)
[Package ndl version 0.2.18 Index]