Hayley
May 14, 2019, 12:15am
1
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?
Hlynur
May 14, 2019, 10:38am
2
Hi Hayley, your problem might just stem from a simple typo. Rather annoyingly, the Sys.which
function name is capitalized, and your call to it has a lower case s.
Try running it again with a capital S in the function name, and you'll get a different result.
Sys.which("pdflatex")
1 Like
That definitely could be part of the problem!
When I caps the "S", I get this response:
pdflatex
""
And when I try to "Knit" an R Markdown, I'm getting the message that no LaTex installation detected.
Have you added MikTeX to PATH?
I guess you're on Windows. There, the steps to add to PATH are:
Search path
on from Start menu.
Open Edit system environment variables
Select Environment variables
Click Path
Click Edit
Add the full location of \miktex\bin
Click OK
3 times for each dialogue boxes.
It's recommended to use tinytex
. Why don't you use it?
You just need to do the following:
install.packages('tinytex')
tinytex::install_tinytex()
1 Like
Thank you Yarnabrina and Hlynur!
I was trying to install TinyTex in R, which wasn't working.
When I installed in R Studio (and messed around with quite a bit), it worked!
Miktex still wasn't working, not sure why.
Thanks for the help!
1 Like
system
Closed
June 4, 2019, 5:53pm
6
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.