From 7eab2ab0a2204ddb6ebe3c937c48d4c9ebd4aaea Mon Sep 17 00:00:00 2001 From: Giulio Benedetti Date: Fri, 28 Jun 2024 18:41:14 +0300 Subject: [PATCH] Do not export .generateOutput --- NAMESPACE | 1 - R/class-AbundanceDensityPlot.R | 9 ++++++--- R/class-AbundancePlot.R | 9 ++++++--- R/class-RDAPlot.R | 9 ++++++--- R/class-RowTreePlot.R | 15 +++++++++------ 5 files changed, 27 insertions(+), 16 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index e28a967..36b7b2b 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -62,7 +62,6 @@ importFrom(shiny,plotOutput) importFrom(shiny,renderPlot) importFrom(shinyWidgets,addSpinner) importFrom(utils,stack) -importMethodsFrom(iSEE,.exportOutput) importMethodsFrom(iSEE,.generateOutput) importMethodsFrom(iSEE,.panelColor) importMethodsFrom(iSEE,.renderOutput) diff --git a/R/class-AbundanceDensityPlot.R b/R/class-AbundanceDensityPlot.R index a9352d3..69ac532 100644 --- a/R/class-AbundanceDensityPlot.R +++ b/R/class-AbundanceDensityPlot.R @@ -236,15 +236,18 @@ setMethod(".renderOutput", "AbundanceDensityPlot", callNextMethod() }) -#' @export #' @importFrom grDevices pdf dev.off setMethod(".exportOutput", "AbundanceDensityPlot", function(x, se, all_memory, all_contents) { - contents <- .generateOutput(x, se, all_memory=all_memory, all_contents=all_contents) + contents <- .generateOutput(x, se, all_memory=all_memory, + all_contents=all_contents) + newpath <- paste0(.getEncodedName(x), ".pdf") - pdf(newpath, width=slot(x, "PanelHeight")/75, height=slot(x, "PanelWidth")*2) + pdf(newpath, width=slot(x, "PanelHeight") / 75, + height=slot(x, "PanelWidth") * 2) + print(contents$plot) dev.off() diff --git a/R/class-AbundancePlot.R b/R/class-AbundancePlot.R index d1e7ea9..942edda 100644 --- a/R/class-AbundancePlot.R +++ b/R/class-AbundancePlot.R @@ -205,15 +205,18 @@ setMethod(".renderOutput", "AbundancePlot", callNextMethod() }) -#' @export #' @importFrom grDevices pdf dev.off setMethod(".exportOutput", "AbundancePlot", function(x, se, all_memory, all_contents) { - contents <- .generateOutput(x, se, all_memory=all_memory, all_contents=all_contents) + contents <- .generateOutput(x, se, all_memory=all_memory, + all_contents=all_contents) + newpath <- paste0(.getEncodedName(x), ".pdf") - pdf(newpath, width=slot(x, "PanelHeight")/75, height=slot(x, "PanelWidth")*2) + pdf(newpath, width=slot(x, "PanelHeight") / 75, + height=slot(x, "PanelWidth") * 2) + print(contents$plot) dev.off() diff --git a/R/class-RDAPlot.R b/R/class-RDAPlot.R index 9ddf17c..9f91abb 100644 --- a/R/class-RDAPlot.R +++ b/R/class-RDAPlot.R @@ -264,15 +264,18 @@ setMethod(".renderOutput", "RDAPlot", callNextMethod() }) -#' @export #' @importFrom grDevices pdf dev.off setMethod(".exportOutput", "RDAPlot", function(x, se, all_memory, all_contents) { - contents <- .generateOutput(x, se, all_memory=all_memory, all_contents=all_contents) + contents <- .generateOutput(x, se, all_memory=all_memory, + all_contents=all_contents) + newpath <- paste0(.getEncodedName(x), ".pdf") - pdf(newpath, width=slot(x, "PanelHeight")/75, height=slot(x, "PanelWidth")*2) + pdf(newpath, width=slot(x, "PanelHeight") / 75, + height=slot(x, "PanelWidth") * 2) + print(contents$plot) dev.off() diff --git a/R/class-RowTreePlot.R b/R/class-RowTreePlot.R index af6b8c5..e563d0e 100644 --- a/R/class-RowTreePlot.R +++ b/R/class-RowTreePlot.R @@ -232,18 +232,21 @@ setMethod(".renderOutput", "RowTreePlot", callNextMethod() }) -#' @export #' @importFrom grDevices pdf dev.off setMethod(".exportOutput", "RowTreePlot", function(x, se, all_memory, all_contents) { - - contents <- .generateOutput(x, se, all_memory=all_memory, all_contents=all_contents) + + contents <- .generateOutput(x, se, all_memory=all_memory, + all_contents=all_contents) + newpath <- paste0(.getEncodedName(x), ".pdf") - - pdf(newpath, width=slot(x, "PanelHeight")/75, height=slot(x, "PanelWidth")*2) + + pdf(newpath, width=slot(x, "PanelHeight") / 75, + height=slot(x, "PanelWidth") * 2) + print(contents$plot) dev.off() - + newpath })