VectorSource {tm}R Documentation

Vector Source

Description

Constructs a source for a vector as input.

Usage

VectorSource(x, encoding = "unknown")

Arguments

x

A vector.

encoding

encoding to be assumed for input strings. It is used to mark character strings as known to be in Latin-1 or UTF-8: it is not used to re-encode the input.

Value

An object of class VectorSource which extends the class Source representing a vector where each entry is interpreted as a document.

Author(s)

Ingo Feinerer

See Also

getSources to list available sources. Encoding on encodings in R.

Examples

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

[Package tm version 0.5-10 Index]