When I type in > sys.which('pdflatex') in Rstudio console
I get this error message
Error in sys.which("pdflatex") : could not find function "sys.which"
Even though I have downloaded Miktex and Tinytex.
It seems like R studio can't find either, and I tried downloading and re-downloading and have really gotten myself in a mess 
Has anyone been in this situation before and could help?