Import Cached Extraction Data for a Batch of Studies
df_import_batch.Rd
Reads 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_data
viadf_import_extraction
. If TRUE, overwrite existing study data in themetawoRld
project. 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:
identifier
The DOI or PMID.
status
"Success", "Skipped" (e.g., cache file missing), or "Failure".
metawoRld_study_path
Path to the study directory if import was successful.
error_message
The error message if status is "Failure" or "Skipped".
Also prints progress and summary information.