Forums | OpenR
OpenR: R & Statistics
/
I can't export PDF files in R Markdown.
25 March 2022, 7:04 PM
25 March 2022, 7:18 PM
maybe try this? https://connect.xjtlu.edu.cn/interaction/forum/topic.php?id=1051
25 March 2022, 8:26 PM
Thanks for your help, but I still have the same problem. I have installed tinytex package and I tried to install pdflatex package, while there is a warning: package ‘pdflatex’ is not available for this version of R.
26 March 2022, 12:16 PM
There is no package called pdflatex in R, as the warning indicates.
You must have misunderstood R packages and LaTeX distribution. In short, you have to install LaTeX, and pdflatex is a component of LaTeX. For installing LaTeX, you can run the following code in R:
tinytex::install_tinytex()
It might take seconds to minutes, depending on you internet connection status.
After the installation, check if it is successfully installed:
tinytex::is_tinytex()
If you get TRUE
, you are done. If FALSE
, restart R or RStudio and repeat these two steps. If still failed, maybe it is your internet problem.
25 March 2022, 9:09 PM
Try knitting half to debug. If not work, knit half again to figure out what went wrong