Learn R Programming

tm (version 0.5-10)

URISource: Uniform Resource Identifier Source

Description

Constructs a source which represents documents located by a uniform resource identifier.

Usage

URISource(x, encoding = "unknown")

Arguments

x
A vector of Uniform Resource Identifier, i.e., either a character identifying the file or a connection.
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 URISource which extends the class Source representing documents located by a URI.

See Also

DirSource for accessing a directory, and getSources to list available sources. Encoding on encodings in R.

Examples

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

Run the code above in your browser using DataLab