Skip to content

Commit

Permalink
#45
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrunqin committed Aug 19, 2024
1 parent b95fc43 commit 428eb1c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions R/utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,19 @@ isKonditional <- function(konditionalResult) {
) %>%
dplyr::ungroup()
}

# Check if imageID is a factor, if not make it as factor whilst keeping order
if(class(cells$imageID) != "factor") {
cells <- cells %>%
dplyr::mutate(imageID = factor(imageID, levels = unique(imageID)))
}

# Check if imageID is a factor, if not make it as factor whilst keeping order
if(class(cells$cellType) != "factor") {
cells <- cells %>%
dplyr::mutate(cellType = factor(cellType, levels = unique(cellType)))
}

cells
}

Expand Down

0 comments on commit 428eb1c

Please sign in to comment.