Description Usage Arguments Value Examples
Function to change documents for textmining objects
1 | setDoc(x, doc, i = 1)
|
x |
text mining object tmCorpus or tmTextDocument |
doc |
element to be attached as content |
i |
index |
x with changed i-th document
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | corp <- tmCorpus(c("This is first document", "This is second"))
corp <- setDoc(corp, "Changed doc", 1)
getDoc(corp, 1)
content(corp) <- c("Content 1", "Content 2")
content(corp)
text <- tmTextDocument("Text document new")
text <- setDoc(text, "Content no 1")
getDoc(text)
content(text)
parsed <- tmParsed(list(c("Parsed", "doc", "one"), c("Parsed", "two")))
parsed <- setDoc(parsed, c("Changed", "document"), 2)
getDoc(parsed, 2)
content(parsed) <- list(c("Changed", "document", "one"), c("Changed", "two"))
content(parsed)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.