loadDataModel: Upload a common data model

Description Usage Arguments Details

View source: R/loadDataModel.R

Description

loadDataModel() reads in a CSV file containing the definitions of a given data model and returns either one table or a list of tables. By default, this function returns the OMOP data model 'OMOP_CDM_v6_0_custom.csv' here. We included in the extdata folder of the installed ROMOPOmics package, but similarly formatted tables can be used as well as long as they are packaged as CSVs.

Usage

1
loadDataModel(master_table_file, as_table_list = FALSE)

Arguments

master_table_file

File containing the total data model used, including "field", "required", "type", "description", and "table" fields.

as_table_list

If TRUE, return the data model split into a list of tables rather than as one solid table.

loadDataModel

Details

See the OMOP CDM document for more details creating a data model here.

There are two requirements: 1. The CDM file will have two fields 'field' and 'table' 2. All entries are non-empty strings

Every table in the given CDM will have an associated id field where the id field is table_id, for example. It describes the unique entry in that table and serves as a foreign key to other tables. This id is created automatically within the function. But, it should be included under the field 'field' so that an index for this foreign key can be established.


AndrewC160/ROMOPOmics documentation built on Jan. 27, 2021, 6:57 p.m.