Ensures that the response vector conforms to the required binary labels.
ensure_binary_response(y, positive = NULL, negative = NULL)Vector containing two outcome levels. Accepted types include factor,
character, logical, or numeric. Level names are coerced to the canonical
c("No", "Yes") order.
Optional character vector of value(s) to treat as the
positive ("Yes") class. Comparisons are case-insensitive.
Optional character vector of value(s) to treat as the
negative ("No") class. Comparisons are case-insensitive.
Factor with levels c("No", "Yes").