diff --git a/R/spicy.R b/R/spicy.R index 6ab2d04..388d085 100644 --- a/R/spicy.R +++ b/R/spicy.R @@ -149,9 +149,9 @@ spicy <- function(cells, ## Check whether the subject parameter has a one-to-one mapping with image if (!is.null(subject)) { - if (nrow(unique(cells[, subject])) == nrow(unique(cells[, imageIDCol]))) { + if (nrow(as.data.frame(unique(cells[, subject]))) == nrow(as.data.frame(unique(cells[, imageIDCol])))) { subject <- NULL - cli::cli_inform("Your specified subject parameter has a one-to-one mapping with imageID. Converting to a linear model instead of mixed model.") + warning("Your specified subject parameter has a one-to-one mapping with imageID. Converting to a linear model instead of mixed model.") } }