mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 12:37:30 +02:00
This commit is contained in:
parent
912fff7474
commit
efc3f8acc3
23 changed files with 1467 additions and 644 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue