DirSource {tm}R Documentation

Directory Source

Description

Constructs a directory source.

Usage

DirSource(directory = ".", encoding = "unknown", pattern = NULL,
          recursive = FALSE, ignore.case = FALSE)

Arguments

directory

A character vector of full path names; the default corresponds to the working directory getwd().

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.

pattern

An optional regular expression. Only file names which match the regular expression will be returned.

recursive

Logical. Should the listing recurse into directories?

ignore.case

Logical. Should pattern-matching be case-insensitive?

Value

An object of class DirSource which extends the class Source representing a directory. Each file in this directory is considered to be a document.

Author(s)

Ingo Feinerer

See Also

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

Examples

DirSource(system.file("texts", "txt", package = "tm"))

[Package tm version 0.5-10 Index]