Learn R Programming

tm (version 0.5-10)

as.PlainTextDocument: Create Objects of Class PlainTextDocument

Description

Create objects of class PlainTextDocument.

Usage

## S3 method for class 'PlainTextDocument':
as.PlainTextDocument(x)
## S3 method for class 'Reuters21578Document':
as.PlainTextDocument(x)
## S3 method for class 'RCV1Document':
as.PlainTextDocument(x)

Arguments

x
A text document.

See Also

getTransformations to list available transformation (mapping) functions.

Examples

Run this code
reut21578 <- system.file("texts", "crude", package = "tm")
r <- Corpus(DirSource(reut21578),
                      readerControl = list(reader = readReut21578XML))
r[[1]]
as.PlainTextDocument(r[[1]])

Run the code above in your browser using DataLab