Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions R/lefser.R
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,8 @@ lefser <-
classf <- colData(relab)[[classCol]]
classf <- as.factor(classf)
lclassf <- levels(classf)
if (is.null(classf) || !identical(length(lclassf), 2L)) {
msg <- "'classCol' must refer to a valid dichotomous (two-level) variable"
stop(msg) # ensure the class has only two levels
}
if (is.null(classf) || length(lclassf) < 2L)
stop("'classCol' must be a valid two or more level variable")
message(
"The outcome variable is specified as '", classCol,
"' and the reference category is '", lclassf[1],
Expand Down