text2vec (version 0.3.0)

ifiles: Creates iterator over text files from the disk

Description

The result of this function usually used in an itoken function.

Usage

ifiles(file_paths, reader_function = readLines, ...)
idir(path, reader_function = readLines, ...)

Arguments

file_paths
character paths of input files
reader_function
function which will perform reading of text files from disk, which should take a path as its first argument.
...
arguments passed to other methods (including reader_function).
path
character path of directory. All files in the directory will be read.

See Also

itoken

Examples

Run this code
current_dir_files <- list.files(path = ".", full.names = TRUE)
files_iterator <- ifiles(current_dir_files)
dir_files_iterator <- idir(path = ".")

Run the code above in your browser using DataCamp Workspace