title: Caption Outside Float Error When Using Stargazer in R Markdown
body: <p>I try to make a table of summary statistics using R Markdown. Below is my code. </p>
  
  <pre><code>{r new, echo=TRUE, results='asis'}
  ws &lt;- t(as.matrix(summary(merged$WS)))
  ows &lt;- t(as.matrix(summary(merged$OWS)))
  
  summary1 &lt;- rbind(ws, ows)
  rownames(summary1) &lt;- c("Win Shares", "Offensive Win Shares") 
  
  stargazer(summary1, title="A Few Summary Statistics on the Data")
  </code></pre>
  
  <p>When I compile, I get the following error:</p>
  
  <p>! LaTeX Error: \caption outside float.</p>
  
  <p>Error: LaTeX failed to compile stargazers_regressions.tex. See <a href="https://yihui.org/tinytex/r/#debugging" rel="nofollow noreferrer">https://yihui.org/tinytex/r/#debugging</a> for debugging tips. See stargazers_regressions.log for more info.
  Execution halted</p>
  
  <p>I have looked up caption outside float in regards to stargazer and haven't seen anything. I have updated all of my packages and even restarted R.</p>
  
  <p>Edit:</p>
  
  <p>Here's a very simple example that still fails:</p>
  
  <pre><code>x &lt;- c(-4, -5)
  y &lt;- c(-8, -10)
  
  table_1 &lt;- rbind(x, y)
  
  stargazer(table_1)
  </code></pre>
  
  <p>It seems that stargazer has an issue with negative numbers. When I changed x to c(4, 5), and y to c(8, 10), the program compiles fine. </p>