Reconcile and re-check a supplementary resources manifest
Source:R/add_suppl_resources.R
recompile_resources.RdRe-scans path and reconciles the result against suppl_res, an existing
manifest (e.g. the output of a previous compile_resources()/
recompile_resources() call, or one read back in from a CSV). Use this
after making manual edits and/or adding or removing files in path to
create a re-checked manifest up-to-date with the contents of path.
suppl_res is treated as the source of truth wherever it overlaps with
what's actually found in path, see vignette("resources") for details.
Arguments
- suppl_res
An existing resources data frame.
- path
Path to a directory to scan for files, or to an existing (non-nested) zip archive to read the file list from directly. Reading a zip archive requires the zip package, and does not extract any files—
fname_resourceisNAfor resources found this way.- rxs_images
A QWAimages object. Its
roxas_versionattribute is used to disambiguate resource-type patterns shared between classic ROXAS and ROXAS AI, and itsorg_img_name,image_label,slide_label, andwoodpiece_labelcolumns are used to auto-populatelinked_labelwhere appropriate.- add_new_files
Logical; if
TRUE, files found inpaththat aren't declared insuppl_resare added as new, freshly-typed rows instead of being left out. DefaultFALSE.
Value
A data frame, see compile_resources(). Aborts instead of
returning if suppl_res lists a file with status == "ok" that isn't
found in path.