Skip to content

Commit

Permalink
provide clear message to only allow one group variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
elong0527 committed Nov 15, 2023
1 parent 2bf59e4 commit 1fd81b3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/metalite_table1.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ metalite_table1 <- function(formula,
if (formula[[2]][[1]] == "|") {
var <- all.vars(formula[[2]][[2]])
group <- all.vars(formula[[2]][[3]])
if(length(group) > 1){
stop("Only one group variable is supported")
}
} else {
var <- all.vars(formula[[2]])
data$group <- "All"
Expand Down

0 comments on commit 1fd81b3

Please sign in to comment.