Skip to content

Commit 73a59b5

Browse files
committed
add STUDYID as required column
1 parent 54bc8c4 commit 73a59b5

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

R/create_clinical_hist_table.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ create_clinical_hist_table <- function(dm_domain, sa_domain,
3939
"SAHR", "SADY", "SASTDY", "VISITDY", "VISITNUM",
4040
"VISIT", "EPOCH", "SAEVLINT", "SAEVINTX"),
4141
values_funct = first){
42+
assert_data_frame(sa_domain, required_vars = exprs(SACAT))
43+
4244
data_dm <- prepare_domain("dm", dm_domain, variables_include = c("STUDYID", "USUBJID"))
4345

4446
data_sa <- sa_domain %>%

R/table_variables.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ table_variables <- function(domain, data, by_STUDYID = FALSE) {
5959
warn(str_c(domain, " domain not included in table_variables() function."))
6060
}
6161
} else {
62+
assert_data_frame(data, required_vars = exprs(STUDYID))
63+
6264
if (domain == "DM") {
6365
return(colnames(data))
6466
} else if (domain == "LB") {

0 commit comments

Comments
 (0)