Read CSV files associated with trials (e.g. Movement files) from paths stored in supplied columns (with top-level directory removed). Column `directory` must be present in dataframe. Function uses `read_csv` to read files.

read_csv_files(
  data,
  data_dir,
  .cols = tidyselect::ends_with("_location_0"),
  drop_tld = TRUE,
  ...
)

Arguments

data

A dataframe of trial results

data_dir

Parent directory where data are stored

.cols

A tidyselect specification of columns (e.g. `c(col1, col2)`).

drop_tld

Drop top-level directory in stored file location? (default TRUE)

...

Additional arguments passed to `read_csv`. Default are columns that end with `_location_0`