title: Upload Multiple Files with Different Delimiters in Shiny
body: <p>My goal is to upload two or more files where each file would have a different delimiter. The ui.R and server.R code below provides an example that works well when both files are read in and have the same delimiter. </p>
  
  <p>However, if I read in file1, say as a .csv, and then read in file2 with a different delimiter, then once I change the delimiter, file1 is then affected and loses its structure. </p>
  
  <p>The objective is to read in file1 with its intended delimiter and then subsequently read in file2 such that it has no impact on file1.</p>
  
  <h1>server.R File</h1>
  
  <pre><code>    options(shiny.maxRequestSize = 9*1024^2)
      shinyServer(function(input, output) {
  
      output$contents1 &lt;- renderTable({
      inFile &lt;- input$file1
      if (is.null(inFile))
        return(NULL)
      read.csv(inFile$datapath, header = input$header,
               sep = input$sep, quote = input$quote)
      })
  
      output$contents2 &lt;- renderTable({
      inFile &lt;- input$file2
      if (is.null(inFile))
        return(NULL)
      read.csv(inFile$datapath, header = input$header,
               sep = input$sep, quote = input$quote)
      })
      })
  </code></pre>
  
  <h1>ui.R</h1>
  
  <pre><code>shinyUI(fluidPage(
  titlePanel("Uploading Files"),
  sidebarLayout(
          sidebarPanel(
          fileInput('file1', 'Choose file 1 to upload',
          accept = c('text/csv','text/comma-separated-values',
          'text/tab-separated-values', 'text/plain',
          '.csv', '.tsv')
          ),
          fileInput('file2', 'Choose file 2 to upload',
          accept = c('text/csv','text/comma-separated-values',
          'text/tab-separated-values','text/plain',
          '.csv','.tsv')
          ),      
          tags$hr(),
          checkboxInput('header', 'Header', TRUE),
          radioButtons('sep', 'Separator',
          c(Comma=',',Semicolon=';',
          Tab='\t',Pipe='|'),
          ','),
          radioButtons('quote', 'Quote',
          c(None='','Double Quote'='"',
          'Single Quote'="'"),
          '"'),
          tags$hr()
          ),
          mainPanel(
          tableOutput('contents1'),
          tableOutput('contents2')
          )
          )
          ))
  </code></pre>