Skip to content

Commit

Permalink
grade should be numeric in ae_table_soc
Browse files Browse the repository at this point in the history
fixes #35
  • Loading branch information
DanChaltiel committed Nov 22, 2024
1 parent 8d38f94 commit 6add9d3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/ae_table_soc.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ ae_table_soc = function(
df_enrol = df_enrol %>%
select(subjid_=any_of2(subjid), arm_=any_of2(arm)) %>%
mutate(arm_ = if(is.null(.env$arm)) default_arm else .data$arm_)
if(!is.numeric(df_ae$grade)){
cli_abort("Grade ({.val {grade}}) should be a numeric column.")
}

df = df_enrol %>%
left_join(df_ae, by="subjid_") %>%
Expand Down

0 comments on commit 6add9d3

Please sign in to comment.