I'm having trouble loading the tikz package on my R GUI:
Loading required package: tikzDevice
In fun(libname, pkgname) :
tikzDevice: No appropriate LaTeX compiler could be found.
Access to LaTeX is required in order for the TikZ device
to produce output.
The following places were tested for a valid LaTeX compiler:
the global option: tikzLatex
the environment variable: R_LATEXCMD
the environment variable: R_PDFLATEXCMD
the global option: latexcmd
the PATH using the command: pdflatex
the PATH using the command: latex
the PATH using the command: /usr/texbin/pdflatex
If you have a working LaTeX compiler, try one of the
Set the path to your compiler as the value of either latexcmd or
tikzLatex in .Rprofile using options().
Set the path to your compiler as the value of either R_LATEXCMD or
R_PDFLATEXCMD in .Renviron.
Ensure the folder containing your compiler is included in PATH.
This can easily be solved thusly:
options(tikzLatex = "PATH")
Substitute PATH by the path of your LaTeX compiler. You can find that out by typing the following in the Terminal, for Mac users: