inst/shiny/SedReviewGUI/server_SCR_5_boxCoefSumm.R

#### Science-Center Review: box coefficient summary ####

observeEvent(input$reviewLoad, {
  BoxCoeff.summary <<-summary_boxcoef(siteData_SCR, timediff = input$searchInterval2)
  
  output$SCLBoxCoefftable <- DT::renderDataTable(
    datatable({BoxCoeff.summary},
              extensions = 'Buttons', 
              rownames = FALSE,
              options = list(dom = 'Bfrtip',
                             buttons = 
                               list('colvis', list(
                                 extend = 'collection',
                                 buttons = list(list(extend ='csv',
                                                     filename = 'SCLBoxCoeffTable'),
                                                list(extend ='excel',
                                                     filename = 'SCLBoxCoeffTable'),
                                                list(extend ='pdf',
                                                     pageSize = 'A2',
                                                     orientation = 'portrait',
                                                     filename = 'SCLBoxCoeffTable')),
                                 text = 'Download'
                               )),
                             scrollX = TRUE,
                             scrollY = "600px",
                             order = list(list(0, 'desc'), list(2, 'asc')),
                             pageLength = nrow({BoxCoeff.summary}),
                             selection = 'single')
              
    ))
})




# SCLBoxCoeff<- eventReactive(input$reviewLoad, {
#   summary_boxcoef(siteData_SCR, timediff = input$searchInterval2)
#   
# })
# 
# 
# output$SCLBoxCoefftable <- DT::renderDataTable(
#   datatable({SCLBoxCoeff()},
#             extensions = 'Buttons', 
#             rownames = FALSE,
#             options = list(dom = 'Bfrtip',
#                            buttons = 
#                              list('colvis', list(
#                                extend = 'collection',
#                                buttons = list(list(extend ='csv',
#                                                    filename = 'SCLBoxCoeffTable'),
#                                               list(extend ='excel',
#                                                    filename = 'SCLBoxCoeffTable'),
#                                               list(extend ='pdf',
#                                                    pageSize = 'A2',
#                                                    orientation = 'portrait',
#                                                    filename = 'SCLBoxCoeffTable')),
#                                text = 'Download'
#                              )),
#                            scrollX = TRUE,
#                            scrollY = "600px",
#                            order = list(list(0, 'desc'), list(2, 'asc')),
#                            pageLength = nrow({SCLBoxCoeff()}),
#                            selection = 'single')
#             
#   ))
USGS-R/sedReview documentation built on Aug. 24, 2020, 9 p.m.