Parse Cochrane Library (CDSR) export files into an sm_corpus object.
Supports both CSV/tab-delimited exports and RIS-format exports from the
Cochrane Library search interface.
Usage
sm_read_cochrane(
path,
encoding = "UTF-8",
engine = c("native", "bibliometrix", "auto"),
verbose = TRUE,
call = rlang::caller_env()
)Arguments
- path
Character scalar. Path to a Cochrane export file (
.csv,.tsv, or.ris).- encoding
Character scalar. File encoding (default
"UTF-8").- engine
Character scalar. One of
"native"(built-in parser),"bibliometrix"(delegate tobibliometrix::convert2df()), or"auto"(try bibliometrix first, fall back to native).- verbose
Logical. Print progress messages?
- call
Caller environment for error reporting.
Value
An sm_corpus object.
Implementation
The Cochrane Library exports records in CSV or RIS format. The CSV export typically contains columns such as: Record Number (or #), Authors, Title, Source, Year, DOI, Abstract. RIS exports follow the standard RIS specification and are delegated to the RIS parser.
References
Aria, M. & Cuccurullo, C. (2017). bibliometrix: An R-tool for comprehensive science mapping analysis. Journal of Informetrics, 11(4), 959–975. doi:10.1016/j.joi.2017.08.007
Examples
path <- tempfile(fileext = ".csv")
writeLines(c(
"Record Number,Authors,Title,Source,Year,DOI,Abstract,Type",
paste0('1,"Chen, Wei; Smith, Sarah",A Cochrane review,',
'Cochrane Database Syst Rev,2023,10.1002/14651858.CD001,',
'An abstract.,Systematic Review')
), path)
corpus <- sm_read_cochrane(path, verbose = FALSE)
corpus$works
#> # A tibble: 1 × 16
#> work_id doi title abstract year type source_id cited_by_count oa_status
#> <chr> <chr> <chr> <chr> <int> <chr> <chr> <int> <chr>
#> 1 W000000001 10.1… A Co… An abst… 2023 Syst… S0000000… NA NA
#> # ℹ 7 more variables: language <chr>, pmid <chr>, arxiv_id <chr>,
#> # openalex_id <chr>, is_retracted <lgl>, retraction_date <date>,
#> # last_refreshed <dttm>
unlink(path)