Import Cached Extraction Data for a Batch of Studies
df_import_batch.RdReads cached extraction data (JSON format saved by df_extract_batch or
manually) for multiple studies and imports them into the specified metawoRld
project using df_import_extraction.
Usage
df_import_batch(
identifiers,
metawoRld_path,
overwrite = FALSE,
validate_json = TRUE,
merge_metadata = TRUE,
stop_on_error = FALSE
)Arguments
- identifiers
Character vector. A vector of DOIs and/or PMIDs for studies that have cached extraction data ready for import.
- metawoRld_path
Character string. Path to the root of the target metawoRld project.
- overwrite
Logical. Passed to
metawoRld::add_study_dataviadf_import_extraction. If TRUE, overwrite existing study data in themetawoRldproject. Defaults toFALSE.- validate_json
Logical. Passed to
df_import_extraction. If TRUE, validate the cached JSON against the schema before importing. Defaults toTRUE.- merge_metadata
Logical. Passed to
df_import_extraction. If TRUE, merge cached bibliographic metadata with extracted metadata. Defaults toTRUE.- stop_on_error
Logical. If TRUE, stop the batch if any single import fails. Defaults to
FALSE.
Value
A data frame (tibble) summarizing the import attempt for each identifier, with columns:
identifierThe DOI or PMID.
status"Success", "Skipped" (e.g., cache file missing), or "Failure".
metawoRld_study_pathPath to the study directory if import was successful.
error_messageThe error message if status is "Failure" or "Skipped".
Also prints progress and summary information.