powered by
Read in multiple files from a directory and create a base::data.frame().
base::data.frame()
read_dir( path, pattern = NULL, doc.col = "document", all.files = FALSE, recursive = FALSE, ignore.case = FALSE, verbose = FALSE, ... )
Path to the directory.
An optional regular expression. Only file names which match the regular expression will be returned.
A string naming the document columns (i.e., file names sans file extension).
Logical. If FALSE, only the names of visible files are returned. If TRUE, all file names will be returned.
FALSE
TRUE
Logical. Should the listing recurse into directories?
logical. If TRUE case in the pattern argument will be ignored.
pattern
Logical. Should Each iteration of the read-in be reported.
Other arguments passed to read_document functions.
Returns a base::data.frame() with file names as a document column and content as a text column.
# NOT RUN { read_dir(system.file("docs/Maas2011/pos", package = "textreadr")) read_dir(system.file("docs/Maas2011", package = "textreadr"), recursive=TRUE) # }
Run the code above in your browser using DataLab