Okay, so this indicates you either don't have pdflatex installed, or it can't be found. If you've never installed a TeX distribution, then the former is probably true.
My recommendation is to use the {tinytex} package and use it to install a lightweight but fully-functional TeX distribution.
You can run this code in R:
tinytex::install_tinytex()
This may take several minutes to install. Once complete, reset your R session and try running Sys.which('pdflatex'). This time it should show you the path to pdflatex which means you should be good to go.
When I ran this code:
tinytex::install_tinytex()
It showed this :
Error in system2("tlmgr", args, ...) : '"tlmgr"' not found
In addition: Warning message:
In extract(pkg, exdir = path.expand(target)) :
error 1 in extracting from zip file
Hmm, there seem to be other threads about getting TinyTeX installed on a Windows machine. I am not a Windows user so I don't know that I can be helpful. Here are some threads that may have possible solutions for you:
this should be the command to run. Can you share all the outputs you get when running this command ? I am surprised that Error in system2("tlmgr", args, ...) : '"tlmgr"' not found would be the direct printed log you get
Error in system2("tlmgr", args, ...) : '"tlmgr"' not found
In addition: Warning message:
In extract(pkg, exdir = path.expand(target)) :
error 1 in extracting from zip file
When I tried it again it kept showing this code:
Error in system2("tlmgr", args, ...) : '"tlmgr"' not found
In addition: Warning message:
In extract(pkg, exdir = path.expand(target)) :
error 1 in extracting from zip file
I mean do you think you could encounter some writing access issue on your computer ?
It seems that unzipping the bundle is not working for you when R is trying to do so.
Other options to install TinyTex can be found here