title: How can I take an Input in Shiny and fill a table with it?
body: <p>I'm attempting to take inputs from various sliders in a Shiny app and consolidate them into a table, however, I keep getting errors such as:</p>
  
  <pre><code>Error in UseMethod("xtable") : 
  no applicable method for 'xtable' applied to an object of class "c('double', numeric')"
  
  
  Error in UseMethod("xtable") : 
  no applicable method for 'xtable' applied to an object of class "reactive"
  
  
  Error in as.vector(x, mode) : 
  cannot coerce type 'closure' to vector of type 'any'
  </code></pre>
  
  <p>I've tried many ideas but cannot get it to work yet. I also haven't found any good examples or explanations to use as guide. </p>
  
  <p>I just need something simple, to fill a table with the result of the sliders, and then be able to print the table via <code>renderTable()</code>. </p>
  
  <p>The code that I have that captures the input from the sliders its as follows:</p>
  
  <pre><code>sliderInput(inputId = "a.w1.a", label = "Investment on advocacy", min = 0, max = 1000000, step = 50000, value = 0),
  
  sliderInput(inputId = "a.w1.b", label = "Investment on B", min = 0, max = 1000000, step = 50000, value = 0)
  </code></pre>
  
  <p>From that, I was able to create a reactive object that then allowed me to plot successfully: </p>
  
  <pre><code>output$fund.a.w1.alloc &lt;- reactive(input$a.w1.a + input$a.w1.b + input$a.w1.c + input$a.w1.d)
  
  output$fund.a.w1.p &lt;- renderPlot(barplot(d.funds.a.w1(), main = "Expenditure strategy (1000's USD)", col = "blue"))
  </code></pre>
  
  <p>But when I try to create a table or a matrix with that same content, I don't seem to get ir right. I have tried stuff like:</p>
  
  <pre><code>fund.w1 &lt;- matrix(c(reactive(input$a.w1.a/1000, input$a.w1.b/1000, input$a.w1.c/1000, input$a.w1.d/1000)), nrow = 2, ncol = 2)
  </code></pre>
  
  <p>Or this:</p>
  
  <pre><code>fund.w1 &lt;- reactive(matrix(c(input$a.w1.a/1000, input$a.w1.b/1000, input$a.w1.c/1000, input$a.w1.d/1000), nrow = 2, ncol = 2))
  </code></pre>
  
  <p>Or this:</p>
  
  <pre><code>fund.w1 &lt;- matrix(reactive(c(input$a.w1.a/1000, input$a.w1.b/1000, input$a.w1.c/1000, input$a.w1.d/1000)), nrow = 2, ncol = 2)
  </code></pre>
  
  <p>I even tried to see if the data objects could compose a table by themselves, but it didn't work. </p>
  
  <p>In fact, it didn't even work something as simple as:</p>
  
  <pre><code>output$fund.w1.f &lt;- renderTable({input$a.w1.a/1000})
  </code></pre>
  
  <p>Or as (having created the matrix before):</p>
  
  <pre><code>fund.w1.f.test[1,1] &lt;- renderText(input$a.w1.a)
  </code></pre>
  
  <p>Thank you in advanced for your help.</p>