Learn R Programming

tm (version 0.5-3)

URISource: Uniform Resource Identifier Source

Description

Constructs a source which represents a single document located by a uniform resource identifier.

Usage

URISource(x, encoding = "UTF-8")

Arguments

x
The Uniform Resource Identifier, i.e., either a character identifying the file or a connection.
encoding
A character giving the encoding of x.

Value

  • An object of class URISource which extends the class Source representing a single document located by a URI.

See Also

DirSource for accessing multiple files, and getSources to list available sources.

Examples

Run this code
loreipsum <- system.file("texts", "loremipsum.txt", package = "tm")
us <- URISource(loreipsum)
inspect(Corpus(us))

Run the code above in your browser using DataLab