Gilead-BioStats / gsm

Good Statistical Monitoring R Package
https://gilead-biostats.github.io/gsm/
Apache License 2.0
39 stars 9 forks source link

Closes #1779 Enhance `CombineSpecs()` with deduplication, enforcing `required` and adding checks for `type` #1815

Closed zdz2101 closed 2 months ago

zdz2101 commented 2 months ago

Overview

utils-CombineSpecs.R now contains 3 functions:

  1. CombineSpecs() which combines a list of specs into a single spec
  2. combine_domain() which does the deduplification of columns
  3. update_column() which does the reinforcement of required = TRUE if its set to TRUE anyhwere else in the spec(s), and throws warning message of type is inconsistent

Test Notes/Sample Code

Added new unit tests in corresponding testthat file