-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.R
42 lines (37 loc) · 960 Bytes
/
server.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
server = function(input, output) {
monitoring_plan <- reactive({
data <- tibble(
Sampling_Device = character()
)
if(input$size_min <= 249){
data <- data %>% add_row(Sampling_Device = "Isokinetic Bulk Water Sampler")
}
if(input$size_max >= 250){
data <- data %>% add_row(Sampling_Device = "BL-84 Net Sampler")
}
return(data)
})
output$table1 <- DT:: renderDataTable(datatable(
monitoring_plan(),
selection = 'none',
rownames = F,
options = list(
paging = FALSE,
fixedColumns = TRUE,
autoWidth = TRUE,
ordering = TRUE,
server = F,
dom = 'Bfrtip',
searching = F
),
class = "display",
style="bootstrap"))
output$downloadData <- downloadHandler(
filename = function() {
paste("monitoring-plan-", Sys.Date(), ".csv", sep = "")
},
content = function(file) {
write.csv(monitoring_plan(), file, row.names = FALSE)
}
)
}