Description Usage Arguments Details Value Examples
Wrapper around read_delim
to read multiple files at once
and return a single tibble
where all files have been combined row-wise.
For example, in a psychological experiment where one task is run repeatedly
for multiple subjects, use this function to read all of their data into one
fully long dataframe at once. As with read_csv
and read_tsv
,
the read_*_multi
versions are special cases of read_delim_multi
for common
types of flat file data, CSV and TSV.
1 2 3 4 5 |
files |
A character vector containing a series of paths to files. |
... |
other arguments passed on to |
read_delim_multi
requires all files to have the same file ending, and thus
the same delimiter.
All functions first attempt to use bind_rows
to combine data, in order
to preserve column data types as rigorously as possible. If this fails, rbind.fill
will instead be used to combine data, which may silently coerce some columns to character.
A data frame, with file contents concatenated row-wise.
Contains a column file
with the file name of origin for each line of data.
1 2 3 4 5 6 7 | ## Not run:
read_csv_multi(files = c("subject1.csv", "subject2.csv", "subject3.csv"))
these_files <- endsWith(list.files("path/to/data/folder"), ".csv")
read_csv_multi(these_files)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.