Hello Friend. I uninstalled MikTex. I reinstalled TinyTex. But it is giving error again.
output file: teste.knit.md
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS teste.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output teste.tex --self-contained --highlight-style tango --pdf-engine pdflatex --variable graphics --lua-filter "C:/Users/Jovani Souza/Documents/R/win-library/3.5/rmarkdown/rmd/lua/pagebreak.lua" --lua-filter "C:/Users/Jovani Souza/Documents/R/win-library/3.5/rmarkdown/rmd/lua/latex-div.lua" --variable "geometry:margin=1in" --include-in-header "C:\Users\Jovani Souza\AppData\Local\Temp\RtmpSkf2Cz\rmarkdown-str355c49d634f1.html"
Erro: LaTeX failed to compile teste.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips.
Além disso: Warning messages:
1: In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
'CreateProcess' failed to run 'C:\Users\Jovani Souza\AppData\Roaming\TinyTeX\bin\win32\pdflatex.exe -halt-on-error -interaction=batchmode "teste.tex"'
2: In system2(...) :
'CreateProcess' failed to run 'C:\Users\Jovani Souza\AppData\Roaming\TinyTeX\bin\win32\pdflatex.exe -halt-on-error -interaction=batchmode "teste.tex"'
3: In system2("tlmgr", args, ...) :
'CreateProcess' failed to run 'C:\Users\Jovani Souza\AppData\Roaming\TinyTeX\bin\win32\tlmgr.bat update --all --self'
Execução interrompida
No LaTeX installation detected (LaTeX is required to create PDF output). You should install a LaTeX distribution for your platform: https://www.latex-project.org/get/
If you are not sure, you may install TinyTeX in R: tinytex::install_tinytex()
Otherwise consider MiKTeX on Windows - http://miktex.org
MacTeX on macOS - https://tug.org/mactex/
(NOTE: Download with Safari rather than Chrome strongly recommended)
Linux: Use system package manager