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
require(rmarkdown)
my_text <- readLines("C:/.../track.txt")
cat(my_text, sep="
", file = "my_text.Rmd")
render("my_text.Rmd", pdf_document())
But it doesn't work showing this error:
> Error: Failed to compile my_text.tex.
In addition: Warning message:
running command '"pdflatex" -halt-on-error -interaction=batchmode "my_text.tex"' had status 127
Is there any other solution ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…