Skip to content

Commit

Permalink
support multigroup
Browse files Browse the repository at this point in the history
  • Loading branch information
LiNk-NY committed Jul 2, 2024
1 parent a8039a3 commit b020437
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions R/lefser.R
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,11 @@ filterKruskal <- function(relab, group, p.value, method = method) {
#' when 'blockCol' is present (default 0.05). If multiple hypothesis testing is
#' performed, this threshold is applied to corrected p-values.
#' @param lda.threshold numeric(1) The effect size threshold (default 2.0).
#'
#' @param groupCol character(1) Column name in `colData(relab)` indicating
#' groups, usually a factor with two levels (e.g., `c("cases", "controls")`;
#' default "GROUP").
#' groups, usually a factor with two or more levels (e.g.,
#' `c("cases", "controls")`; default `"GROUP"`).
#'
#' @param blockCol character(1) Optional column name in `colData(relab)`
#' indicating the blocks, usually a factor with two levels (e.g.,
#' `c("adult", "senior")`; default NULL).
Expand Down Expand Up @@ -253,10 +255,8 @@ lefser <-
groupf <- colData(relab)[[groupCol]]
groupf <- as.factor(groupf)
lgroupf <- levels(groupf)
if (is.null(groupf) || !identical(length(lgroupf), 2L)) {
msg <- "'groupCol' must refer to a valid dichotomous (two-level) variable"
stop(msg) # ensure the class has only two levels
}
if (is.null(groupf) || length(lgroupf) < 2L)
stop("'groupCol' must be a valid two or more level variable")
message(
"The outcome variable is specified as '", groupCol,
"' and the reference category is '", lgroupf[1],
Expand Down
4 changes: 2 additions & 2 deletions man/lefser.Rd

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

0 comments on commit b020437

Please sign in to comment.