title: r markdown: data frame (or data.table) goes out of page
body: <p>I am trying to create an HTML output using R - markdown. The problem is that whenever I try to output any table, the formatting is very sparse. Ideally the table should be easily fitted in <em>one page width</em> but since the formatting is too sparse, one needs to scroll to the right to see the output.</p>
  <p>Here is the code and output.</p>
  <pre><code>```{r}
  df = data.frame(
    first.var = 1:10, 
    second.var = letters[1:10],
    third.var = LETTERS[1:10],
    fourth.var = paste0(letters[1:10],&quot;-&quot;,LETTERS[1:10]),
    fifth.var = &quot;this will not go out of screen&quot;,
    sixth.var = &quot;but this will go out of the screen&quot;
  )
  df
  ```
  </code></pre>
  <p><a href="https://i.stack.imgur.com/FEQMg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FEQMg.png" alt="enter image description here" /></a></p>
  <p>How can I fit more columns in one page width, so that I don't have to scroll.</p>