I work with RStudio (version 3.1.2). When I try to knit a PDF in an R Markdown script, I get the following output:
Error in eval (expr, envir, enc): object 'pdflatex' not found
I installed the base MikTex and searched for solutions on the Internet. There is one in stackoverflow for Mac users, I work with Windows 7. It seems that the problem is not related to the Tex installation. I found this quick guide to solve it on Windows: enter the link here
So, I did what he said: Sys.which("pdflatex")and received:
pdflatex
""
Ten I typed:, Sys.getenv("PATH")having received:
1 "C: \ Program Files \ R \ R-3.1.2 \ bin \ x64; C: \ WINDOWS \ system32; C: \ WINDOWS; C: \ WINDOWS \ System32 \ Wbem; C: \ WINDOWS \ System32 \ WindowsPowerShell \ v1.0 \; C: \ Program Files (x86) \ Intel \ OpenCL SDK \ 2.0 \ bin \ x86; C: \ Program Files (x86) \ Intel \ OpenCL SDK \ 2.0 \ bin \ x64; C: \ Program Files \ WIDCOMM \ Bluetooth Software \; C: \ Program Files \ WIDCOMM \ Bluetooth Software \ syswow64;: / usr / texbin: / usr / texbin "
Finally, I entered: Sys.setenv(PATH=paste(Sys.getenv("PATH"),"/usr/texbin",sep=":"))but when I try to knit the PDF again, it shows me the same error message. Thanks for all your time, I would appreciate any help.
source
share