Learn R Programming

tm (version 0.7-7)

VectorSource: Vector Source

Description

Create a vector source.

Usage

VectorSource(x)

Arguments

x

A vector giving the texts.

Value

An object inheriting from VectorSource, SimpleSource, and Source.

Details

A vector source interprets each element of the vector 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 <- c("This is a text.", "This another one.")
(vs <- VectorSource(docs))
inspect(VCorpus(vs))
# }

Run the code above in your browser using DataLab