From b31580273d413740ee954f11de52b72a97d2eb56 Mon Sep 17 00:00:00 2001 From: Schultheis Date: Wed, 16 Oct 2019 11:00:07 +0200 Subject: [PATCH] download: omit filepath when using orca because it always prepends absolut path. --- R/function.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/R/function.R b/R/function.R index 6648f67..963d11d 100644 --- a/R/function.R +++ b/R/function.R @@ -1246,8 +1246,9 @@ download <- function(file, filename, plot, width, height, ppi = 72, save_plot = wd <- getwd() on.exit(setwd(wd)) # make sure working directory will be restored setwd(tempdir()) - plotly::orca(p = plot, file = plot_file_pdf) - plotly::orca(p = plot, file = plot_file_png) + # Omit file path because orca adds it regardles of it already being there. + plotly::orca(p = plot, file = basename(plot_file_pdf)) + plotly::orca(p = plot, file = basename(plot_file_png)) setwd(wd) } else if (class(plot) == "Heatmap") { # TODO: find better way to check for complexHeatmap object # complexHeatmap