Spaces:
Running
Running
Update app.R
Browse files
app.R
CHANGED
|
@@ -41,7 +41,9 @@ ui <- list(useShinyjs(),navbarPage(windowTitle = "TrendChecker",
|
|
| 41 |
actionButton("run",strong("Run Search"),icon("caret-right"))
|
| 42 |
),
|
| 43 |
mainPanel(
|
| 44 |
-
withSpinner(plotOutput("plot"),type = 8)
|
|
|
|
|
|
|
| 45 |
|
| 46 |
))
|
| 47 |
))
|
|
@@ -121,6 +123,17 @@ output$plot <- renderPlot({
|
|
| 121 |
trend2()
|
| 122 |
|
| 123 |
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
|
| 125 |
}
|
| 126 |
|
|
|
|
| 41 |
actionButton("run",strong("Run Search"),icon("caret-right"))
|
| 42 |
),
|
| 43 |
mainPanel(
|
| 44 |
+
withSpinner(plotOutput("plot"),type = 8),
|
| 45 |
+
downloadButton("plot_download","Download",icon = icon("download"))),
|
| 46 |
+
|
| 47 |
|
| 48 |
))
|
| 49 |
))
|
|
|
|
| 123 |
trend2()
|
| 124 |
|
| 125 |
})
|
| 126 |
+
|
| 127 |
+
output$plot_download <- downloadHandler(
|
| 128 |
+
filename = function(){
|
| 129 |
+
paste("graph",".jpg",sep = "")
|
| 130 |
+
},
|
| 131 |
+
content = function(file){
|
| 132 |
+
jpeg(file)
|
| 133 |
+
trend2()
|
| 134 |
+
dev.off()
|
| 135 |
+
}
|
| 136 |
+
)
|
| 137 |
|
| 138 |
}
|
| 139 |
|