VectorSource {tm}R Documentation

Gmane Source

Description

Constructs a source for a vector.

Usage

## S4 method for signature 'vector':
VectorSource(object, encoding = "UTF-8")

Arguments

object A vector holding the texts.
encoding A character giving the encoding of the file.

Value

An S4 object of class VectorSource which extends the class Source representing a vector interpreting each element as a document.

Author(s)

Ingo Feinerer

Examples

docs <- c("This is a text.", "This another one.")
(vs <- VectorSource(docs))
inspect(Corpus(vs))

[Package tm version 0.3-3 Index]