Batch wrapper around analyze_plate() that never stops on a single bad
image: failures are recorded and reported. A QC figure is written for
every plate — inspect them before using the numbers.
analyze_plates(
files,
metadata = NULL,
layout = plate_layout(),
qc_dir = NULL,
...,
verbose = TRUE
)Character vector of image paths, or a directory (all JPEG/PNG/TIFF files are used).
Optional data frame with a file column (base name) or
plate_id column plus any design variables (treatment, strain,
bacterium, day, replicate ...). Merged into all output tables.
A single plate_layout(), or a function
function(metadata_row) returning the layout for each plate (e.g.
centre = "none" for controls).
Directory for QC PNGs (created if needed). The default
NULL writes nothing; give a folder, e.g. qc_dir = "qc", to save one
QC figure per plate.
Further arguments passed to analyze_plate().
Print progress.
A list of three data frames (colonies, profiles, plates)
and a failed data frame.
if (FALSE) { # \dontrun{
meta <- data.frame(file = c("2026_05_26_20.JPG", "2026_05_26_37.JPG"),
treatment = c("bacteria", "control"))
lay <- function(row) plate_layout(centre = if (row$treatment == "control") "none" else "bacteria")
out <- analyze_plates("plates/", metadata = meta, layout = lay, qc_dir = "qc/")
write.csv(out$colonies, "colonies.csv", row.names = FALSE)
} # }