From e6d21ad81308943e080a61239e7e71a4e588d9d7 Mon Sep 17 00:00:00 2001 From: Putter Tiatragul Date: Mon, 9 Oct 2023 18:04:54 +1100 Subject: [PATCH] ggplot warnings recommend including after_stat instead --- R/enmtools.vip.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/enmtools.vip.R b/R/enmtools.vip.R index 6c13635..b0485ec 100644 --- a/R/enmtools.vip.R +++ b/R/enmtools.vip.R @@ -153,7 +153,7 @@ enmtools.vip <- function(model, metric = "auc", nsim = 10, method = "permute", v output[["permute.plot"]] <- ggplot(plotdf, aes_string(x = "Importance", - fill = "..x..")) + + fill = after_stat("..x.."))) + geom_histogram(bins = 20) + theme_bw() + geom_hline(yintercept = 0, color = "grey") +