Añadir función de exportar objeto del plot.
This commit is contained in:
@@ -131,7 +131,7 @@ server <- function(input, output) {
|
|||||||
t_maps<-generate_labstats(t_stats, t, "value", "variable", "Groups")
|
t_maps<-generate_labstats(t_stats, t, "value", "variable", "Groups")
|
||||||
dades$maps<<-t_maps
|
dades$maps<<-t_maps
|
||||||
}
|
}
|
||||||
if (length(unique(dades$taula[,"Groups"])) < 2){
|
if (length(unique(dades$taula %>% pull(Groups))) < 2){
|
||||||
dades$stats<<-1
|
dades$stats<<-1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -211,6 +211,7 @@ server <- function(input, output) {
|
|||||||
output$expPlot <- renderPlot({
|
output$expPlot <- renderPlot({
|
||||||
observeEvent(dades$final, {})
|
observeEvent(dades$final, {})
|
||||||
if (!is.null(dades$final)){
|
if (!is.null(dades$final)){
|
||||||
|
print(dades$stats)
|
||||||
t_substr<-dades$final
|
t_substr<-dades$final
|
||||||
t_stats<-dades$stats %>% filter(p.signif != "ns")
|
t_stats<-dades$stats %>% filter(p.signif != "ns")
|
||||||
t_maps<-dades$maps
|
t_maps<-dades$maps
|
||||||
@@ -268,16 +269,19 @@ server <- function(input, output) {
|
|||||||
)
|
)
|
||||||
output$downloadPicture <- downloadHandler(
|
output$downloadPicture <- downloadHandler(
|
||||||
filename = function() {
|
filename = function() {
|
||||||
paste("Figura", ".png", sep="")
|
paste("Figura", ".zip", sep="")
|
||||||
},
|
},
|
||||||
content = function(file){
|
content = function(file){
|
||||||
print(file)
|
print(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("plot.png", width = input$width, height=input$height, units = "px", res=720)
|
||||||
plot(dades$plot)
|
plot(dades$plot)
|
||||||
dev.off()
|
dev.off()
|
||||||
|
save(dades$plot, list="plot", file="plot.RObject")
|
||||||
|
zip(file,
|
||||||
|
c("plot.png","plot.RObject")
|
||||||
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user