Skip to content

Commit

Permalink
fix: use the proper join_keys set api
Browse files Browse the repository at this point in the history
  • Loading branch information
vedhav committed Nov 15, 2023
1 parent 0d48a0b commit 0333907
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions early-dev/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,12 @@ datanames(data) <- datanames

# set join keys
join_keys(data) <- default_cdisc_join_keys[datanames] # get default keys by name
join_keys(data)["ADTR"] <- c("STUDYID", "USUBJID", "PARAMCD", "AVISIT")
join_keys(data)["ADTRWF"] <- c("STUDYID", "USUBJID", "PARAMCD", "AVISIT")
join_keys(data)["ADRSSWIM"] <- c("STUDYID", "USUBJID", "PARAMCD", "AVISIT")
join_keys(data)["ADTR", "ADSL"] <- c("STUDYID", "USUBJID")
join_keys(data)["ADTRWF", "ADSL"] <- c("STUDYID", "USUBJID")
join_keys(data)["ADRSSWIM", "ADSL"] <- c("STUDYID", "USUBJID")
join_keys(data)[["ADTR"]][["ADTR"]] <- c("STUDYID", "USUBJID", "PARAMCD", "AVISIT")
join_keys(data)[["ADTRWF"]][["ADTRWF"]] <- c("STUDYID", "USUBJID", "PARAMCD", "AVISIT")
join_keys(data)[["ADRSSWIM"]][["ADRSSWIM"]] <- c("STUDYID", "USUBJID", "PARAMCD", "AVISIT")
join_keys(data)[["ADTR"]][["ADSL"]] <- c("STUDYID", "USUBJID")
join_keys(data)[["ADTRWF"]][["ADSL"]] <- c("STUDYID", "USUBJID")
join_keys(data)[["ADRSSWIM"]][["ADSL"]] <- c("STUDYID", "USUBJID")

## App configuration ----
# reuse object from teal_data
Expand Down
4 changes: 2 additions & 2 deletions exploratory/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ datanames <- c("ADSL", "ADRS", "ADLB", "ADLBPCA")
datanames(data) <- datanames

join_keys(data) <- default_cdisc_join_keys[datanames]
join_keys(data)["ADLBPCA"] <- c("USUBJID", "STUDYID", "PARAMCD", "AVISIT")
join_keys(data)["ADLBPCA", "ADSL"] <- c("USUBJID", "STUDYID")
join_keys(data)[["ADLBPCA"]][["ADLBPCA"]] <- c("USUBJID", "STUDYID", "PARAMCD", "AVISIT")
join_keys(data)[["ADLBPCA"]][["ADSL"]] <- c("USUBJID", "STUDYID")

## Reusable Configuration For Modules
ADSL <- data[["ADSL"]]
Expand Down

0 comments on commit 0333907

Please sign in to comment.