.csv
files in a directoryRead all .csv
files in a directory, with labels if specified.
read_all_csv(
path,
...,
labels_from = NULL,
clean_names_fun = NULL,
read_fun = "guess",
datetime_extraction = "guess",
verbose = getOption("edc_read_verbose", 1)
)
a list containing one dataframe for each .csv
file in the folder, the extraction date (datetime_extraction
), and a summary of all imported tables (.lookup
).
[character(1)
]
path to the directory containing .csv
files.
unused
[misc
]
list of path to file containing the labels.
[function
]
a function to clean column names, e.g. tolower, janitor::clean_names()
,...
[function
]
a function to read the files in path, e.g. read.csv()
, read.csv2()
,...
[dateish(1)
]
the datetime of database extraction (database lock). If "guess", the datetime will be inferred from the files modification time.
[numeric(1)
]
the level of verbosity
labels_from
should contain the information about column labels. It should be a data file (.csv
) containing 2 columns: one for the column name and the other for its associated label. Use options(edc_col_name="xxx", edc_col_label="xxx")
to specify the names of the columns.