How I got RStudio Desktop Elspeth Geranium on macOS Silicon

Bug report also filed 2023-01-24

The current version of RStudio had been giving me problems and I was putting off trying to fix it until others began to report problems.

The main problem that I experienced was installing or updating packages. These come downloaded in compressed formula and the RStudio Console could not find /usr/bin/tar to decompress it and returned an error. Running R in the macOS R.app GUI or from a terminal or the RStudio terminal pane didn't have the problem.

I fixed it.

First, I broke quarto rendering, so if you have to render quarto within RStudio and you can do without install/update within RStudio, stop here. I'm beginning to think of the inability to render as a feature, though. Chunks still render OK, it's just not possible to dump a complete HTML or pdf file. I too easily fall into the "are we there yet" trap by fixing presentation errors at every step rather than just doing the real job—actual analysis, not fingerpainting. The separate quarto command line utility works just fine for rendering.

Actually, I didn't break quarto rendering; I was just attempting from the wrong directory.

Second, I nuked, with Zap.App the existing R.app and R.Studio, which seemed to clear out some accumulated cruft. Then reinstalled via the normal R pkg installer and RStudio dmg installer.

Next, I removed from my ~ home folder the file .Renviron and recreated it with

R_INCLUDE_DIR=/Library/Frameworks/R.framework/Resources/include
R_LIBS_SITE=/Library/Frameworks/R.framework/Resources/library     
R_LIBS_USER=/Library/Frameworks/R.framework/Resources/library

together with my $PATH (use your own)

PATH=/Users/ro/.nvm/versions/node/v18.9.1/bin:/opt/homebrew/Cellar/python@3.10/3.10.9/bin:/Applications/CMake.app/Contents/bin:/opt/homebrew/bin:/Users/ro/.cargo/bin:/Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia:/usr/local/go/bin:/Users/ro/.fig/bin:/usr/local/mysql-8.0.28-macos11-x86_64/bin:/bin:/usr/bin:/usr/local/bin:/usr/sbin:/sbin:/Users/ro/.local/bin

and, because a man with two watches never knows what time it is

RSTUDIO_PANDOC=/usr/local/bin/pandoc
RSTUDIO_QUARTO=/usr/local/bin/quarto

which you can omit and, of course, should omit if you haven't done standalone versions of pandoc and quarto.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.