From 502849579b3587a2b103f8fa205e7376989fb3e9 Mon Sep 17 00:00:00 2001 From: Nathalie Vialaneix <nathalie.vialaneix@inrae.fr> Date: Tue, 21 Feb 2023 15:29:40 +0100 Subject: [PATCH] improved output of plots --- R/SFCB.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/R/SFCB.R b/R/SFCB.R index 8d4cd14..9b8bf5a 100644 --- a/R/SFCB.R +++ b/R/SFCB.R @@ -275,7 +275,7 @@ plot.SFCB <- function(x, sel.type = c("importance", "selection"), threshold = "none") { args <- list("x" = x) - args$"plot.type" <- match.arg(plot.type) + plot.type <- match.arg(plot.type) args$"shape.imp" <- match.arg(shape.imp) args$"sel.type" <- match.arg(sel.type) args$"threshold" <- threshold @@ -285,5 +285,7 @@ plot.SFCB <- function(x, args <- args[names(formals(plot_function))] p <- do.call("plot_function", args) - return(p) + if (plot.type != "dendrogram") return(p) + + return(invisible()) } \ No newline at end of file -- GitLab