Description Usage Arguments Value Examples
This function is deprecated. Use CreateDtm
instead.
1 2 3 4 |
vec |
A character vector of documents. |
docnames |
A vector of names for your documents. Defaults to
|
min.n.gram |
The minimum size of n for creating n-grams. Defaults to 1. |
max.n.gram |
The maximum size of n for creating n-grams. Defaults to 1. Numbers greater than 3 are discouraged due to risk of overfitting. |
remove.stopwords |
Do you want to remove standard stopwords from your documents?
Defaults to |
custom.stopwords |
If not |
lower |
Do you want all words coerced to lower case? Defaults to |
remove.punctuation |
Do you want to convert all non-alpha numeric
characters to spaces? Defaults to |
remove.numbers |
Do you want to convert all numbers to spaces? Defaults
to |
stem.document |
Do you want to stem the words in your document using
Porter's word stemmer? Defaults to |
... |
Other arguments to be passed to |
A document term matrix of class dgCMatrix
. The rows index
documents. The columns index terms. The i, j entries represent the count of
term j appearing in document i.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
data(nih_sample)
dtm <- Vec2Dtm(vec = nih_sample$ABSTRACT_TEXT,
docnames = nih_sample$APPLICATION_ID,
min.n.gram = 1, max.n.gram = 2)
dim(dtm)
head(colnames(dtm))
head(rownames(dtm))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.