loadtext: load a text file

loadtextR Documentation

load a text file

Description

(Down)Load a text file (and extract it if it is in a zip file).

Usage

loadtext(
  file = file.choose(),
  dir = "~/",
  collapse = TRUE,
  sep = NULL,
  categories = NULL
)

Arguments

file

The path or URL of the text file.

dir

The (temporary) directory, where the file is downloaded. The file is deleted at the end of this function.

collapse

Indicates whether or not lines of each documents should collapse together or not.

sep

Separator between text fields.

categories

Columns that should be considered as categorial data.

Value

The text contained in the dowloaded file.

See Also

download.file, unzip

Examples

## Not run: 
text = loadtext ("http://mattmahoney.net/dc/text8.zip")

## End(Not run)

fdm2id documentation built on July 9, 2023, 6:05 p.m.

Related to loadtext in fdm2id...