getPhrases | R Documentation |
Display a frequency matrix containing all the documents for which the indices are given in docs with their principal phrases and the number of times they occur in each document.
getPhrases(pd, doc, ids = TRUE)
pd |
A phraseDoc object |
doc |
An integer vector containing indices of documents, or a character vector containing the ids of documents (column names) |
ids |
A logical value with TRUE (default) to return ids (if available), FALSE to return indices |
A matrix with the documents and # of occurrences of principal phrases
for the documents in docs
tst=c("This is a test text",
"This is a test text 2",
"This is another test text",
"This is another test text 2",
"This girl will test text that man",
"This boy will test text that man")
pd=phraseDoc(tst)
getPhrases(pd, c(1,3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.