Browse Source

Añadir exportar objeto R

master
Costa 3 years ago
parent
commit
d4125f635e
1 changed files with 13 additions and 2 deletions
  1. +13
    -2
      invivos/app.R

+ 13
- 2
invivos/app.R

@ -645,7 +645,7 @@ server <- function(input, output) {
content = function(file){ content = function(file){
# tempReport <- file.path(tempdir(), "elispots.Rmd") # tempReport <- file.path(tempdir(), "elispots.Rmd")
# file.copy("elispots.Rmd", tempReport, overwrite = TRUE) # 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$fig_id == "Survival"){
if (input$vacc == "Sí"){ if (input$vacc == "Sí"){
arrange_ggsurvplots(dades$plot, nrow=2, ncol=1) arrange_ggsurvplots(dades$plot, nrow=2, ncol=1)
@ -654,8 +654,19 @@ server <- function(input, output) {
} }
}else{plot(dades$plot)} }else{plot(dades$plot)}
dev.off() 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")
)
}) })
} }

Loading…
Cancel
Save