Guest User

Untitled

a guest
Sep 22nd, 2016
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. library(shiny)
  2. library(magrittr)
  3.  
  4. shinyServer(function(input, output) {
  5. options(shiny.maxRequestSize=30*1024^2)
  6. datafile <- reactive({
  7. read.csv(input$file1$datapath,stringsAsFactors = FALSE) %>% filter(as.Date(訂單日期)>=input$date[1] & as.Date(訂單日期) <= input$date[2]) %>%
  8. group_by(商品名稱,選項) %>% summarise(itemsales = sum (數量)) %>% .[grep(input$clean,.$商品名稱),]
  9.  
  10. })
  11.  
  12.  
  13.  
  14.  
  15. output$mermer <- renderDataTable({
  16. if (is.null(input$file1)) { return(NULL)}
  17. datafile ()
  18. })
  19.  
  20. })
Advertisement
Add Comment
Please, Sign In to add comment