Skip to content

Commit

Permalink
changed to warning
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrunqin committed Jul 31, 2024
1 parent 02240af commit d5c9403
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/spicy.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
}
}

Expand Down

0 comments on commit d5c9403

Please sign in to comment.