Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(shiny)
- library(magrittr)
- shinyServer(function(input, output) {
- options(shiny.maxRequestSize=30*1024^2)
- datafile <- reactive({
- read.csv(input$file1$datapath,stringsAsFactors = FALSE) %>% filter(as.Date(訂單日期)>=input$date[1] & as.Date(訂單日期) <= input$date[2]) %>%
- group_by(商品名稱,選項) %>% summarise(itemsales = sum (數量)) %>% .[grep(input$clean,.$商品名稱),]
- })
- output$mermer <- renderDataTable({
- if (is.null(input$file1)) { return(NULL)}
- datafile ()
- })
- })
Advertisement
Add Comment
Please, Sign In to add comment