Skip to contents

Widens the files list column of a metadata tibble into one row per attached file, so that what a study's participants uploaded (drawings, audio recordings, anything sent with jatos.uploadResultFile()) can be listed, filtered and planned before a download. Component results without files contribute no row.

Usage

jatos_result_files(metadata)

Arguments

metadata

A metadata tibble from jatos_results_metadata(), jatos_read_metadata() or jatos_flatten_metadata(). Only its id columns and files are used.

Value

A tibble with study_result_id, component_result_id, component_id, batch_id, filename and size (bytes on the server).

See also

jatos_download_files() to fetch them.

Examples

meta <- jatos_flatten_metadata(
  system.file("extdata", "metadata.json", package = "jatosr")
)
jatos_result_files(meta)
#> # A tibble: 1 × 6
#>   study_result_id component_result_id component_id batch_id filename     size
#>             <int>               <int>        <int>    <int> <chr>       <dbl>
#> 1            9002                7003          121       34 drawing.png  4096