Skip to contents

Reads cached extraction JSON data for a study, validates it against the project schema, optionally merges with cached metadata, transforms it, and imports it into the metawoRld project structure using metawoRld::add_study_data.

Usage

df_import_extraction(
  identifier,
  metawoRld_path,
  overwrite = FALSE,
  validate_json = TRUE,
  merge_metadata = TRUE
)

Arguments

identifier

Character string. The DOI or PMID of the study to import.

metawoRld_path

Character string. Path to the root of the target metawoRld project.

overwrite

Logical. Passed to metawoRld::add_study_data. If a directory for the study already exists in metawoRld/data/, should its contents be overwritten? Defaults to FALSE.

validate_json

Logical. Should the extracted JSON content be validated against the project schema and internal links before importing? Defaults to TRUE.

merge_metadata

Logical. Should cached metadata (Title, Authors, Year, Journal, DOI, Abstract fetched via df_fetch_metadata) be merged into the metadata section from the extraction, prioritizing the fetched values for these specific fields? Defaults to TRUE.

Value

Invisibly returns the path to the study directory within the metawoRld project if successful, otherwise aborts with an error.