Description Usage Arguments Value Examples
The function reads a batch of files within one directory and concatenates them into one data.frame (or equivalent structure). This is useful, when your data of each participant is stored in a separate file.
1 | multiple_file_reader(files, extension, reader_function, path = ".", ...)
|
files |
Usually, a vector of character strings with the names of the files to read in |
extension |
A character string for the file extension like csv, tsv. Only csv supported right now. |
reader_function |
The function to use for reading individual files |
path |
A character string indicating the path to the files to read |
... |
Additional parameters for the reader function, like sep or dec |
A data frame (or equivalent structure) with the concatenated files
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
files_names <- letters[1:3]
# Reads three files with .csv extension in the working directory using readr::read_csv
my_data <- multiple_file_reader(file_names, ".csv", reader::read_csv)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.