Apply a function to every project in a session
Usage
at_batch_apply(
session,
fn,
...,
scope = "all",
progress = TRUE,
call = rlang::caller_env()
)Arguments
- session
An annot_session.
- fn
A function
fn(project, image, idx, ...)returning an annot_project.- ...
Passed to
fn.- scope
"all"(default),"complete","current", or"flagged".- progress
Logical; show a progress bar. Default
TRUE.- call
The calling environment, for error reporting.
Value
The annot_session with modified projects. An image whose project
cannot be materialised, or for which fn errors or does not return an
annot_project, keeps its previous project; the failures are reported in
one warning and attached as the "batch_errors" attribute, a
tibble::tibble with columns idx, image and message.
See also
Other batch:
at_batch_check_geometry(),
at_export_all(),
at_summary_table()