Skip to contents

Use the CrossRef API to match data (e.g., Cristin metadata with Crossref metadata) or search by title, authors and date

Usage

ZoteroMatch(
  title,
  authors,
  date,
  haystack = NULL,
  haystack.size = 3,
  crossref.search = FALSE,
  autosearch = FALSE,
  cristin.data = NULL,
  external.data = NULL,
  polite = TRUE,
  silent = FALSE,
  prefer.semantic = FALSE,
  log = list()
)

Arguments

title

Title of reference

authors

creators of the reference

date

publication date of the reference

haystack

Potential matches for search term (i.e., needle), Default: NULL

haystack.size

Number of items in the haystack, Default: 3

crossref.search

Search CrossRef if needle not found in haystack, Default: FALSE

autosearch

Match automatically or compare needle with haystack, Default: FALSE

cristin.data

Metadata from Cristin, Default: NULL

external.data

Metadata from external source (e.g., CrossRef), Default: NULL

polite

Will use an email stored in `.Renviron`, Default: TRUE

silent

Running silent, running deep, Default: FALSE

prefer.semantic

Prefer metadata from Semantic Scholar, Default: FALSE

log

A list for storing log elements, Default: list()

Value

A Zotero-type matrix (tibble) if match is found otherwise NULL

Details

Please see https://oeysan.github.io/c2z/

Examples

# \donttest{
  # Conduct an autosearch in CrossRef using title, authors and date
  example <- ZoteroMatch(
    title = "Nonreplicable publications",
    authors = "Serra-Garcia & Gneezy",
    date = "2021",
    autosearch = TRUE
  )
#> Status 200: Zotero Match is OK. 
#> Found 1 potential match 

  # Print index using `ZoteroIndex`
  if (any(nrow(example$data))) {
  ZoteroIndex(example$data) |>
    dplyr::select(name) |>
    print(width = 80)
  }
#> # A tibble: 1 × 1
#>   name                                                                          
#>   <chr>                                                                         
#> 1 Serra-Garcia & Gneezy (2021) Nonreplicable publications are cited more than r…
# }