Guest User

Untitled

a guest
Nov 22nd, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. mainPanel(
  2. DT::dataTableOutput("table"), #My Table
  3. plotOutput("plot")) # My graph
  4. downloadButton("plot_export", "PDF"),
  5. # Button
  6. downloadButton("downloadData", "XLS")
  7. ))
  8.  
  9. cpk_total <- reactive({
  10. data_testeur <- odbcConnect(input$base, uid="uid")
  11.  
  12. SQL query to feed my dataTable
  13.  
  14. Close connexion data_testeur
  15.  
  16. return result created from the SQL query
  17. })
  18.  
  19. output$Table <- DT::renderDataTable({
  20. DT::datatable(cpk_total(),...) # Formating table
  21. })
  22.  
  23. output$plot <- renderPlot({
  24. dta <- cpk_total()
  25. data_testeur <- odbcConnect(input$base, uid="uid")
  26.  
  27. another SQL query to trace the graph for 1 item selected
  28. #This SQL query use a variable from the created cpk_total table
  29.  
  30. Close connexion data_testeur
  31.  
  32. graph <- ....
  33.  
  34. )
Add Comment
Please, Sign In to add comment