title: export all the content of r script into pdf
body: <p>I would want to export all the content of r script into pdf. Could it be possible?
  I used these commands export, but what I see I just exported graphics</p>
  
  <pre><code>pdf(file = "example.pdf")
    dev.off()
  </code></pre>
  
  <p>Thank you!</p>
  
  <pre><code>    setwd("C:/Users/Prat/Desktop/c")
      &gt; dir()
      [1] "script.R"
      &gt; knitr::stitch('script.r')
   output file: script.tex
  </code></pre>
  
  <p>In my folder doesn't appears a script.pdf else a script.tex and a folder with the pictures in pdf <img src="https://i.stack.imgur.com/PlANZ.png" alt="enter image description here"></p>