From d4125f635e417a13dd1f7c2ab7e8875477d7bc45 Mon Sep 17 00:00:00 2001 From: Costa <47926492N@ICO.SCS.local> Date: Thu, 15 Jul 2021 15:46:35 +0200 Subject: [PATCH] =?UTF-8?q?A=C3=B1adir=20exportar=20objeto=20R?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- invivos/app.R | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/invivos/app.R b/invivos/app.R index da71471..d2bb86e 100644 --- a/invivos/app.R +++ b/invivos/app.R @@ -645,7 +645,7 @@ server <- function(input, output) { content = function(file){ # tempReport <- file.path(tempdir(), "elispots.Rmd") # file.copy("elispots.Rmd", tempReport, overwrite = TRUE) - png(file, width = input$width, height=input$height, units = "px", res=720) + png("invivo.png", width = input$width, height=input$height, units = "px", res=720) if (input$fig_id == "Survival"){ if (input$vacc == "Sí"){ arrange_ggsurvplots(dades$plot, nrow=2, ncol=1) @@ -654,8 +654,19 @@ server <- function(input, output) { } }else{plot(dades$plot)} dev.off() - + if (input$fig_id == "Survival"){ + if (input$vacc == "Sí"){ + invivo.plot<-arrange_ggsurvplots(dades$plot, nrow=2, ncol=1) + }else{ + invivo.plot<-arrange_ggsurvplots(list(dades$plot), ncol=1) + } + }else{invivo.plot<-dades$plot} + save(invivo.plot, file="invivoplot.RObject") + zip(file, + c("invivo.png", "invivoplot.RObject") + ) }) + }