Reimport manual-review candidate pairs exported from CiteSource
Source:R/reimport.R
reimport_dedup_candidates.RdReads a CSV of candidate duplicate pairs previously written by
export_dedup_candidates() (i.e. the $manual_dedup element of
dedup_citations(manual = TRUE)). This supports a deferred workflow: run
automatic deduplication now, export both the unique citations and the
candidate pairs, and complete the manual review later after re-importing.
Value
A data frame of candidate pairs with duplicate_id.x / duplicate_id.y
read as character (matching the unique citations from reimport_csv()), ready
for review and dedup_citations_add_manual().
Details
After review, set the result column to "match" for confirmed duplicates
and pass the result, together with the reimported unique citations, to
dedup_citations_add_manual().
Examples
if (interactive()) {
candidates <- reimport_dedup_candidates("path/to/candidates.csv")
# mark confirmed duplicates, then merge into the reimported unique set
candidates$result <- ifelse(candidates$result == "match", "match", "no_match")
final <- dedup_citations_add_manual(reimport_csv("unique.csv"), candidates)
}