repair_refs: Find empty fields across bibliographic data

View source: R/repair_refs.R View source: R/fill_blanks.R

repair_refsR Documentation

Find empty fields across bibliographic data

Description

Fill in missing information for a bibliuographic dataset by searching the Open Alex API.

Fill in missing information for a bibliographic dataset by searching the Open Alex API.

Usage

repair_refs(
  refs,
  replace_abstracts = FALSE,
  repair_incomplete = TRUE,
  source = "lens",
  title_search = TRUE,
  token = "NFxMqRTdXCQRq3uDl8NgduSAXcEf5DAqLIBAPALydHloF0n1n2Xi"
)

repair_refs(
  refs,
  replace_abstracts = FALSE,
  repair_incomplete = TRUE,
  source = "lens",
  title_search = TRUE,
  token = "NFxMqRTdXCQRq3uDl8NgduSAXcEf5DAqLIBAPALydHloF0n1n2Xi"
)

Arguments

refs

A data frame outputted from synthesisr.

Value

A data frame matching the input in style, but containing filled in information where there were blanks. Where multiple matches were obtained on Open Alex, these are provided for the user to decide which to retain.

A data frame matching the input in style, but containing filled in information where there were blanks. Where multiple matches were obtained on Open Alex, these are provided for the user to decide which to retain.

Examples

## Not run: 
library(openalex)
devtools::install_github("kth-library/openalex", dependencies = TRUE)
openalex_polite("neal_haddaway@hotmail.com")
devtools::install_github("massimoaria/openalexR", dependencies = TRUE)
library(openalexR)
file <- "Users/neal.haddaway/OneDrive - SEI/ESHackathon/4.Remote 2020/citationchaser private/archive/inst/shiny-examples/citationchaser/www/references.ris"
refs <- synthesisr::read_refs(file.choose())
repaired_refs <- repair_refs(refs, replace_abstracts = TRUE)

## End(Not run)
## Not run: 
library(openalexR)
file <- file.choose()
refs <- synthesisr::read_refs(file)
repaired_refs <- repair_refs(refs, replace_abstracts = TRUE, title_search = FALSE)

## End(Not run) 

nealhaddaway/bibfix documentation built on Dec. 24, 2024, 7:43 p.m.