title: Using multiple reactive values
body: <p>I am trying to create a shiny R application where the user inputs 2 dates: the start date and the end date(assuming that the user will choose either of the dates for a particular week).By choosing the dates the user will be able to see how much he will be selling each item from a list of items next week within those days. I have been provided with data on what percent of total sales happen each day within a week. Using that and using data on sales of each item from past week I have tried to create the app. However I think I am making some error while using the reactive expression. Any help will be greatly appreciated. I have provided the code below.</p>
  
  <pre><code>ui.R
  library(shiny)
  shinyUI(fluidPage(
    sidebarLayout(
      sidebarPanel(
        dateInput('Start_Date',label = "starting on:",value = Sys.Date())
        dateInput('End_Date',label = "Ending on:",value = Sys.Date())
      ),
      mainPanel(
        tableoutput("mytable")
        )
    )
    ))
  
  server.R
  library(shiny)
  library(stats)
  shinyServer(function(input, output) {
    Days&lt;-c("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
    Percent_sales_by_day&lt;-c(.10,.14,.14,.14,.14,.17,.17)
    Data_days&lt;-data.frame(Days,Percent)
    items_sold&lt;-c("A","B","C","D")
    sales_last_week&lt;-c("100","200","300","800")
    Data_sales&lt;-data.frame(items_sold,sales_last_week)
    Day_vector&lt;-reactive({
      weekdays(seq(as.Date(input$Start_Date),as.Date(input$End_Date),by = "days")) 
    })
    Daily_split_vector&lt;-reactive({
      library(dplyr)
      Data_days%&gt;%
        filter(Days %in% Day_vector())
      Data_days$Percent_sales_by_day
    })
    Daily_split_value&lt;-reactive({
      sum(Daily_split_vector())
    })
    Forecast&lt;-reactive({
      Data_sales%&gt;%
        mutate(sales_last_week=sales_last_week* Daily_split_value())
    })
    output$mytable&lt;-renderTable({
      Forecast()
    })
    })
  </code></pre>