integrate_changes: Integrate changes in image matching

View source: R/integrate_changes.R

integrate_changesR Documentation

Integrate changes in image matching

Description

integrate_changes takes the results of manual image comparison using the compare_images Shiny app and integrates them into the data frame of image matches produced by identify_matches or confirm_matches. Matches whose status was confirmed as either "match" or "no match" will have their value in the match field updated accordingly, and will additionally receive a TRUE value for a new confirmed field which integrate_changes adds. Matches whose status was not confirmed will have their match value unchanged, and will received a confirmed value of FALSE. Matches which were highlighted using the in-app interface will receive a TRUE value for a new highlight field.

Usage

integrate_changes(result, change_table)

Arguments

result

A data frame produced by identify_matches (with confirm = TRUE or with confirm_matches subsequently run on the results). Any additional fields added to the data frame will be preserved in the output.

change_table

A data frame produced by compare_images.

Value

The original data frame given in the result argument, with three changes: 1) matches which were confirmed as "match" or "no match" will have their value in the match field updated accordingly; 2) a confirmed field will be added if not already present, and matches which were confirmed will receive a value of TRUE (others will be FALSE); and 3) a highlight field will be added with a value of TRUE for matches highlighted using the in-app interface and FALSE otherwise.

Examples

## Not run: 
# Setup
sigs <- create_signature(test_urls)
matches <- match_signatures(sigs)
result <- identify_matches(matches)

# Use compare_images to manually verify match status
change_table <- compare_images(result)

# Then integrate the changes into `result`
result <- integrate_changes(result, change_table)

## End(Not run)

UPGo-McGill/matchr documentation built on July 19, 2023, 1:02 p.m.