Skip to content
Prev 14054 / 15075 Next

/usr/local/bin not writable

Simon,

thanks for your advice which I followed and it works (of course). My 
next step was to install pandoc so I could write pdf reports. I did it 
with the aid of homebrew  and got it in /opt/homebrew/bin/, which is in 
my PATH. My Makefile is

R_OPTS=--no-save --no-restore --no-init-file --no-site-file

paper4.pdf: paper4.Rmd
	R ${R_OPTS} -e "rmarkdown::render('paper4.Rmd')"
	pdflatex paper4.tex

and this makes fine. However (and this is my question), running it from 
inside Rapp:

 > rmarkdown::render('paper4.Rmd')

gives me "Error: pandoc version 1.12.3 or higher is required and was not 
found". (My version is 2.17.1.1)

 > system("echo $PATH") indeed shows that /opt/homebrew/bin is missing,

but issuing 'echo $PATH' at the command line gives a much longer PATH 
including /opt/homebrew/bin and ~/Library/TinyTeX/...

Do I have to set PATH in .Renviron? I have set the PATH in .zshrc

Thanks again!

G?ran

PS. No such problems on my ubuntu machine.
On 2022-02-15 23:23, Simon Urbanek wrote: