minor steps
Some checks are pending
pkgdown.yaml / pkgdown (push) Waiting to run

This commit is contained in:
Andreas Gammelgaard Damsbo 2025-03-12 18:27:46 +01:00
commit efc3f8acc3
No known key found for this signature in database
23 changed files with 1467 additions and 644 deletions

View file

@ -256,8 +256,8 @@ outcome_type <- function(data) {
cl_d <- class(data)
if (any(c("numeric", "integer") %in% cl_d)) {
out <- "continuous"
} else if (identical("factor", cl_d)) {
if (length(levels(data)) == 2) {
} else if (any(c("factor", "logical") %in% cl_d)) {
if (length(levels(data)) == 2 | identical("logical",cl_d)) {
out <- "dichotomous"
} else if (length(levels(data)) > 2) {
out <- "ordinal"