Skip to content

Commit

Permalink
#107 vs spec read
Browse files Browse the repository at this point in the history
  • Loading branch information
edgar-manukyan committed Dec 7, 2024
1 parent 7e7e462 commit a39dfae
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
18 changes: 18 additions & 0 deletions R/generate_code.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
# - Changed is.numeric/is.character into is_numeric/is_character
# - I did not generate id_vars since the default values was enough, certainly we
# can add it later when the customized id_vars are needed.
# - Some extra manipulations done in get_domain_spec()
# - Moved VSTESTCD before qualifired, e.g. VSSTAT, VSPOS so that topic is created first
# - Changed mapping_is_dataset to TRUE for VSTPT, VSDTC
# - Added a new column topic, showing to which topic the mapping belongs to


#' Generate the code for the mapping SDTM specification
Expand All @@ -29,6 +33,20 @@
#'
#' @examples
#' \dontrun{
#' # VS domain ----
#' spec <- read_spec("vs_sdtm_oak_spec.csv")
#' domain <- "vs"
#'
#' spec <- spec |>
#' dplyr::filter(
#' !is.na(target_sdtm_variable),
#' !is.na(mapping_algorithm),
#' !target_sdtm_variable %in% c("DOMAIN"),
#' !mapping_is_dataset %in% c("TRUE")
#' )
#'
#' # CM domain ----
#'
#' spec <- read_spec("cm_sdtm_oak_spec_cdash.csv")
#'
#' spec <- spec |>
Expand Down
24 changes: 22 additions & 2 deletions man/generate_code.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a39dfae

Please sign in to comment.