title: How to Keep text from running off page when knitting to pdf?
body: <p>This is my first question on Stack Overflow so I'm going to do my best to follow the guidelines.</p>
  <p>My problem is that when I knit to pdf, I often can't keep the code from running off the page.</p>
  <p><a href="https://i.stack.imgur.com/7X4ts.png" rel="nofollow noreferrer">code running off page in pdf</a></p>
  <p>I know that my first step is to look through previously asked questions, and I have found a few that address my question, but none of the answers in those questions worked for me.</p>
  <p>I've tried the following:</p>
  <ol>
  <li><p>adding  <code>options(width=X)</code></p>
  </li>
  <li><p>adding {r, tidy=TRUE, tidy.opts=list(width.cutoff=X)}</p>
  </li>
  </ol>
  <p>Note that I tried a variety of different numbers for X in both of my attempts.</p>
  <p>Thank you in advance for your help.</p>