Description Usage Arguments Author(s) Examples
View source: R/create_matrix.R
Creates an object of class DocumentTermMatrix
from tm that can be used in the create_container
function.
1 2 3 4 5 | create_matrix(textColumns, language="english", minDocFreq=1, maxDocFreq=Inf,
minWordLength=3, maxWordLength=Inf, ngramLength=1, originalMatrix=NULL,
removeNumbers=FALSE, removePunctuation=TRUE, removeSparseTerms=0,
removeStopwords=TRUE, stemWords=FALSE, stripWhitespace=TRUE, toLower=TRUE,
weighting=weightTf)
|
textColumns |
Either character vector (e.g. data$Title) or a |
language |
The language to be used for stemming the text data. |
minDocFreq |
The minimum number of times a word should appear in a document for it to be included in the matrix. See package tm for more details. |
maxDocFreq |
The maximum number of times a word should appear in a document for it to be included in the matrix. See package tm for more details. |
minWordLength |
The minimum number of letters a word or n-gram should contain to be included in the matrix. See package tm for more details. |
maxWordLength |
The maximum number of letters a word or n-gram should contain to be included in the matrix. See package tm for more details. |
ngramLength |
The number of words to include per n-gram for the document-term matrix. |
originalMatrix |
The original |
removeNumbers |
A |
removePunctuation |
A |
removeSparseTerms |
See package tm for more details. |
removeStopwords |
A |
stemWords |
A |
stripWhitespace |
A |
toLower |
A |
weighting |
Either |
Timothy P. Jurka <tpjurka@ucdavis.edu>, Loren Collingwood <lorenc2@uw.edu>
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.