getDocs {phm} | R Documentation |
Display Frequency Matrix for Phrases
Description
Display a frequency matrix containing all the documents that contain any of the phrases in phrs and the number of times they occur in that document.
Usage
getDocs(pd, phrs, ids = TRUE)
Arguments
pd |
A phraseDoc object. |
phrs |
A set of phrases. |
ids |
A logical value with TRUE (default) to return ids (if available), FALSE to return indices. |
Value
A matrix with the documents and # of occurrences for the phrases in phrs.
Examples
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)
getDocs(pd, c("test text","another test text"))
[Package phm version 1.1.2 Index]