Deduplicates citation data. Duplicates are assumed to be published in the same journal, so pre-prints vs. their published versions will not be merged.
Value
When manual = FALSE: a dataframe of unique citations. When
manual = TRUE: a list with $unique (unique citations),
$manual_dedup (potential pairs for review), and $auto_pairs
(pairs that were merged automatically - feed to dedup_log() together
with confirmed manual pairs to build a full provenance log).
Examples
# Load example data from the package
examplecitations_path <- system.file("extdata", "examplecitations.rds",
package = "CiteSource")
examplecitations <- readRDS(examplecitations_path)
# Deduplicate citations
dedup_results <- dedup_citations(examplecitations)
#> formatting data...
#> Warning: Search contains missing values for the record_id column. A record_id will be created using row numbers
#> identifying potential duplicates...
#> identified duplicates!
#> flagging potential pairs for manual dedup...
#> 165 citations loaded...
#> 67 duplicate citations removed...
#> 98 unique citations remaining!
# Return potential pairs for manual review
dedup_results_manual <- dedup_citations(examplecitations, manual = TRUE)
#> formatting data...
#> Warning: Search contains missing values for the record_id column. A record_id will be created using row numbers
#> identifying potential duplicates...
#> identified duplicates!
#> flagging potential pairs for manual dedup...
#> 165 citations loaded...
#> 67 duplicate citations removed...
#> 98 unique citations remaining!