Update a QWAmetadata object to match a QWAimages object
Source:R/partial_update.R
update_QWAmetadata.RdReplaces the $images component of x with images and updates the
hierarchical tables ($sites, $trees, $woodpieces, $slides)
accordingly:
the hierarchy columns and counts (
n_trees,n_woodpieces,n_slides,n_images) are derived fromimages;species_codeis kept fromxwhere it isNAinimages,all other columns are kept from
x,rows for IDs new in
imagesare added (other columnsNA),rows for IDs no longer in
imagesare removed.
Arguments
- x
a QWAmetadata object
- images
a QWAimages object; the complete set of images of the updated dataset
Value
An updated QWAmetadata object
Details
Tables that are NULL in x remain NULL (see complete_QWAmetadata()).
The image columns set in the apps (colType "meta_input", e.g. only_ew,
img_comment from the metadata app, and "qc_input", e.g.
comment_handled from the flags app) are filled from
x$images where they are missing or NA in images, e.g. after rebuilding
it with build_QWAimages().
Submission files only; TRIA dataset files are not edited.