Skip to contents

A duplicate is only what strong identity proves: an exact DOI, an exact attachment MD5, or normalized title plus year plus first-author family name. A bare title match proves nothing — generic titles collide across distinct documents — and reuse is refused when the first record carries a file the second lacks, whatever the metadata says.

Usage

zotSameItem(a, b)

Arguments

a, b

Lists with any of doi, md5, title, year, author (first-author family name) and hasFile (logical).

Value

A list: match (logical) and basis ("doi", "md5", "title-year-author" or "none").

See also

ztTwins() for pairwise candidate detection.

Examples

A <- list(doi = "10.1000/Example", hasFile = TRUE)
B <- list(doi = "10.1000/example", hasFile = TRUE)
zotSameItem(A, B)
#> $match
#> [1] TRUE
#> 
#> $basis
#> [1] "doi"
#> 

# A title alone never establishes identity.
zotSameItem(list(title = "Introduction"), list(title = "Introduction"))
#> $match
#> [1] FALSE
#> 
#> $basis
#> [1] "none"
#>