Learn R Programming

omock (version 0.6.1)

mockVocabularySet: Creates an empty mock CDM database populated with various vocabulary tables set.

Description

This function create specified vocabulary tables to a CDM object. It can either populate the tables with provided data frames or initialize empty tables if no data is provided. This is useful for setting up a testing environment with controlled vocabulary data.

Usage

mockVocabularySet(cdm = mockCdmReference(), vocabularySet = "GiBleed")

Value

Returns the modified cdm object with the provided vocabulary set tables.

Arguments

cdm

A cdm_reference object that serves as the base structure for adding vocabulary tables. This should be an existing or a newly created CDM object, typically initialized without any vocabulary tables.

vocabularySet

A character string that specifies a prefix or a set name used to initialize mock data tables. This allows for customization of the source data or structure names when generating vocabulary tables.

Examples

Run this code
library(omock)

# Create a mock CDM reference and populate it with mock vocabulary tables
cdm <- mockCdmReference() |> mockVocabularySet(vocabularySet = "GiBleed")

# View the names of the tables added to the CDM
names(cdm)

Run the code above in your browser using DataLab