title: R shiny: read a table from file and use it
body: <p>I want to read a data.frame from file and then use it for making plots later on.
  The problem is that when I read the data, it is part of an output Object and can not be used further. I want to use the data from the  csv file to make many different plots.
  Here is a small example where the csv file have two columns, what I want to do is in the end of the function server. </p>
  
  <pre><code>shiny::runApp(list(
   ui=pageWithSidebar(
      headerPanel('Simple matrixInput')
      ,
      sidebarPanel(
          fileInput('file1', 'Choose CSV File',
                    accept=c('text/csv', 'text/comma-separated- values,text/plain', '.csv'))
          ,
          tags$hr(),
          checkboxInput('header', 'Header', TRUE),
          radioButtons('sep', 'Separator',
                       c(Comma=',',
                         Semicolon=';',
                         Tab='\t'),
                       'Comma'),
  
          radioButtons('dec', 'Desimal seperator',
                       c('komma'=",",
                         'punktum'="."), 'komma')
      )
      ,
      mainPanel(
  
          tableOutput(outputId = 'table.output'),
          plotOutput("plot1")
      ))
  ,
  server=function(input, output){
      output$table.output &lt;- renderTable({
  
          inFile &lt;- input$file1
  
          if (is.null(inFile))
              return(NULL)
  
          tbl &lt;- read.csv(inFile$datapath, header=input$header, sep=input$sep,  dec = input$dec)
  
          return(tbl)
      })
  
      #I also want to do this:
      #  output$plot1 &lt;- plot(tbl[,1], tbl[,2])
  }
  )) 
  </code></pre>