title: How to convert docx to PDF?
body: <p>I want to ask if it is possible to convert text files such as word document or text document to PDF using R ?
  I thought of converting it to .rmd and then to PDF using this code</p>
  <pre><code>require(rmarkdown)
  my_text &lt;- readLines(&quot;C:/.../track.txt&quot;)
  cat(my_text, sep=&quot;  \n&quot;, file = &quot;my_text.Rmd&quot;)
  render(&quot;my_text.Rmd&quot;, pdf_document())
  </code></pre>
  <p>But it doesn't work showing this error:</p>
  <pre><code>&gt; Error: Failed to compile my_text.tex.
  In addition: Warning message:
  running command '&quot;pdflatex&quot; -halt-on-error -interaction=batchmode &quot;my_text.tex&quot;' had status 127 
  </code></pre>
  <p>Is there any other solution ?</p>