title: Plot different reactive graph using different dataset and columns based on reacitve inputs in shiny
body: <p>I am currently trying to teach myself shiny, and am having a little trouble.
  I want to make an app that has a menu for which dataset the user would like to plot from, followed by another menu for which variable they would like to plot (against the date column)</p>
  
  <p>I have managed to get the reactive menus working, but i am struggling to work out how to 'call' the selected dataset. I have read a lot of posts (e.g  <a href="https://stackoverflow.com/questions/28839372/shiny-selectinput-subset-based-on-input">1</a>,<a href="https://stackoverflow.com/questions/17635673/select-a-variable-from-drop-down-and-pass-it-as-an-argument-in-reactiveplot-in-r">2</a>) but none seem to deal with the multiple dataset problem.</p>
  
  <p>My code currently looks like this, with my issues being on the last few lines (how do I get to the mydata within outVar()?!?). </p>
  
  <p>If anyone could point me in the right direction that would be great! </p>
  
  <pre><code>library(shiny)
  library(ggplot2)
  
  datafiles&lt;-c("Data/try2.txt","Data/Poland.txt","Data/Romania.txt","Data/Hungary.txt","Data/KHR.txt")
  
  
  runApp(list(
    ui = bootstrapPage(
      selectInput('dataset', 'Choose Dataset', datafiles),
      selectInput('columns', 'Columns', ""),
      plotOutput('graph')
    ),
  
    server = function(input, output, session){
      outVar = reactive({
        mydata = read.table(paste0(input$dataset), sep = '\t', header=TRUE)
        names(mydata)
  
      })
      observe({
        updateSelectInput(session, "columns",
                          choices = outVar()
        )})
      output$graph&lt;-renderPlot({data&lt;- outVar$mydata
      plot(data$Date,data$paste0(input$columns))})
    }
  ))
  
  shinyApp(ui=ui, server=server)    
  </code></pre>