Add Study Data to a metawoRld Project
add_study_data.Rd
Adds the metadata (YAML) and quantitative data (CSV) for a single study to the project, performing validation against the project's schema.
Arguments
- path
Character string. The path to the root directory of the metawoRld project. Defaults to the current working directory (
.
).- study_id
Character string. A unique identifier for the study (e.g., PMID, DOI, or a custom ID). This will be used as the directory name within the
data/
folder. Should be filesystem-friendly.- metadata_list
List. A named list containing the study's metadata, conforming to the
metadata_fields
defined in the project's schema. Must includemeasurement_methods
andoutcome_groups
as named lists if linkage validation is expected.- data_df
Data frame. A data frame containing the quantitative data, conforming to the
data_fields
defined in the project's schema. Must includemethod_ref_id
andgroup_label
columns matching keys inmetadata_list
for linkage validation.- overwrite
Logical. If a directory for
study_id
already exists, should its contents be overwritten? Defaults toFALSE
.