ifiles
From text2vec v0.3.0
by Dmitriy Selivanov
Creates iterator over text files from the disk
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
Examples
current_dir_files <- list.files(path = ".", full.names = TRUE)
files_iterator <- ifiles(current_dir_files)
dir_files_iterator <- idir(path = ".")
Community examples
Looks like there are no examples yet.