tm (version 0.7-1)

DataframeSource: Data Frame Source

Description

Create a data frame source.

Usage

DataframeSource(x)

Arguments

x

A data frame giving the texts.

Value

An object inheriting from DataframeSource, SimpleSource, and Source.

Details

A data frame source interprets each row of the data frame x as a document.

See Also

Source for basic information on the source infrastructure employed by package tm.

Examples

Run this code
# NOT RUN {
docs <- data.frame(c("This is a text.", "This another one."))
(ds <- DataframeSource(docs))
inspect(VCorpus(ds))
# }

Run the code above in your browser using DataLab