From 8d2816cd3c190a98386743f705c6df906c601b6d Mon Sep 17 00:00:00 2001 From: Derek Chiu Date: Thu, 28 Sep 2023 13:29:57 -0700 Subject: [PATCH] refactor to remove forcats dep --- DESCRIPTION | 1 - R/graphs.R | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 301e73c..ec4f7c8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -38,7 +38,6 @@ Imports: clv, clValid, dplyr (>= 0.7.5), - forcats, ggplot2, infotheo, klaR, diff --git a/R/graphs.R b/R/graphs.R index 091c478..b62772d 100644 --- a/R/graphs.R +++ b/R/graphs.R @@ -92,7 +92,7 @@ get_cdf <- function(mat) { purrr::flatten_dfc() %>% tidyr::gather("Group", "CDF", names(.)) %>% tidyr::separate("Group", c("k", "Method"), sep = "\\.") %>% - dplyr::mutate(k = forcats::fct_inseq(.data$k)) + dplyr::mutate(k = factor(.data$k, levels = as.integer(unique(.data$k)))) } #' @param main heatmap title. If `NULL` (default), the titles will be taken from