Could anyone tell me how to compile a tex file to a pdf using Knitr commands in R?
I am automating a process of report creation for my job and there is a specific report type where I need to knit a tex file, this is done in the following way:
knitr::knit('\somedirectory..')
I then use the shell command to execute a Python script for 'regex' reasons.
At this point I am left with the tex file in the correct format but cannot figure out how to execute the final step of creating the PDF from within R.
The whole process needs to be automated so loading up TeXmaker or the like is unfortunately not an option.
The closest thing I have found to an answer is in this post: Is it possible to compile .tex files to PDF with 'pandoc'?
However, I am not at all familiar with using pandoc directly. Can these pandoc commands be executed in R somehow?
Many thanks to any help in advance.