Learn R Programming

textmining (version 0.0.1)

getDoc: Function to access documents for textmining objects

Description

Function to access documents for textmining objects

Usage

getDoc(x, i = 1)

Arguments

x
object to retrive document fe tmCorpus or tmTextDocument
i
index

Value

returns i-th document of object x

Examples

Run this code
corp <- tmCorpus(c("This is first document", "This is second"))
getDoc(corp, 1)
getDoc(corp, 2)
content(corp)

text <- tmTextDocument("Text document new")
getDoc(text)
content(text)

parsed <- tmParsed(list(c("Parsed", "doc", "one"), c("Parsed", "two")))
getDoc(parsed, 2)
content(parsed)

Run the code above in your browser using DataLab