DataframeSource {tm}R Documentation

Data Frame Source

Description

Constructs a source from a data frame.

Usage

DataframeSource(object, encoding = "UTF-8")

Arguments

object A data frame holding the texts.
encoding A character giving the encoding of the file.

Value

An S4 object of class DataframeSource which extends the class Source representing a data frame interpreting each row as a document.

Author(s)

Ingo Feinerer

See Also

DataframeSource-class

Examples

docs <- data.frame(docs = c("This is a text.", "This another one."))
(ds <- DataframeSource(docs))
inspect(Corpus(ds))

[Package tm version 0.3-3 Index]