bids_entities() is the vectorized counterpart to encode(). It accepts a
character vector of full paths or bare filenames and returns one row per
input path with the union of parsed BIDS entity columns.
Examples
bids_entities(c(
"sub-01_task-rest_run-01_bold.nii.gz",
"sub-01_task-rest_run-02_bold.nii.gz"
))
#> # A tibble: 2 × 7
#> .path kind subid task run suffix type
#> <chr> <chr> <chr> <chr> <int> <chr> <chr>
#> 1 sub-01_task-rest_run-01_bold.nii.gz bold 01 rest 1 nii.gz func
#> 2 sub-01_task-rest_run-02_bold.nii.gz bold 01 rest 2 nii.gz func