title: R - error "non-numeric argument to binary operator" in shiny
body: <p>I'm very new to r (and programming in general) and we were asked to make a web app using r shiny, the plan was to make a matrix operations calculator from different input files,(first .cvs file contains matrix 1, 2nd .cvs file contains matrix 2) but an error keeps appearing</p>
  <pre><code> Listening on http://127.0.0.1:3420
   Warning: Error in FUN: non-numeric argument to binary operator
   99: eval
   98: eval
   97: Ops.data.frame
   96: renderTable [C:/Users/Acer/Desktop/FirstWebApp/app (1).R#45]
   95: func
   82: origRenderFunc
   81: output$oput
    1: runApp
  </code></pre>
  <p>this is my UI</p>
  <pre><code>     ui &lt;- fluidPage(
    titlePanel(&quot;Multiple file uploads&quot;),
    sidebarLayout(
      sidebarPanel(
       fileInput(&quot;file1&quot;,
                 label=&quot;Upload CSVs here&quot;),
       fileInput(&quot;file2&quot;, &quot;upload file here&quot;),
       selectInput(&quot;ops&quot;, &quot;Select Operation&quot;,
                   choices = c(&quot;addition&quot;,&quot;subtraction&quot;,&quot;multiplication&quot;,&quot;division&quot;))
       
    ),
    mainPanel(
       tableOutput(&quot;input_file&quot;),
       tableOutput(&quot;input_file2&quot;),
       tableOutput(&quot;oput&quot;)
  </code></pre>
  <p>and my <code>server</code> looks like this</p>
  <pre><code>server &lt;- function(input, output) {
  output$input_file &lt;- renderTable({
    file_to_read =  input$file1
    if (is.null(file_to_read)) {
      return()
   }
    read.table(file_to_read$datapath, sep = ',', header = FALSE)
  })
  
  output$input_file2 &lt;- renderTable({
    file_to_read =  input$file2
    if (is.null(file_to_read)) {
      return()
    }
    read.table(file_to_read$datapath, sep = ',', header = FALSE)
  })
  output$oput &lt;- renderTable({
  switch(input$ops,
         &quot;addtion&quot; = input$file1 + input$file2,
         &quot;subtraction&quot; = input$file1 - input$file2,
         &quot;multiplication&quot; = input$file1 * input$file2,
         &quot;division&quot; = input$file1 / input$file2)
  })
  }
  </code></pre>
  <p>how do I fix this and if this error is fixed will the program run?</p>