Why is pdflatex.exe failing to compile my R Markdown file for PDF output?

hey guys im after some help on r markdown on R studio. Please help me overcome this issue as its been bugging me all day. thanks

output file: samig.knit.md

! Sorry, but C:\Users\samih\AppData\Local\Programs\MiKTeX\miktex\bin\x64\pdflatex.exe did not succeed.

! The log file hopefully contains the information to get MiKTeX going again:

!   C:\Users\samih\AppData\Local\MiKTeX\miktex\log\pdflatex.log

Error: LaTeX failed to compile samig.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See samig.log for more info.

I am trying to knit my file to pdf but for some reason its not letting me

Read more here: Source link