Read json files associated with trials from paths stored in supplied columns (with top-level directory removed). #' Column `directory` must be present in dataframe. Function uses `jsonlite::read_json` to read files.

read_json_files(
  data,
  data_dir,
  .cols = ends_with("_json_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 from path

...

Additional arguments passed to `read_json`. Default are columns that end with `_json_location_0`