Skip to content

Commit

Permalink
Drop unused direction factor levels
Browse files Browse the repository at this point in the history
  • Loading branch information
willgryan committed Jul 13, 2023
1 parent e0ed04c commit a5b54e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/prepare_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ prepare_data <- function(input, embeddings, ontology_index) {
tidyr::pivot_longer(cols = c(!"GOID"), names_to = "Group") %>%
dplyr::filter(.data$value != 0) %>%
dplyr::mutate(
Direction = factor(sign(.data$value), levels = c(-1, 1), labels = c("-", "+")),
Direction = factor(sign(.data$value), levels = c(-1, 1), labels = c("-", "+")) %>% droplevels(),
UniqueID = paste0(.data$GOID, "_", .data$Group)) %>%
dplyr::distinct(.data$UniqueID, .keep_all = T)

Expand Down

0 comments on commit a5b54e8

Please sign in to comment.