I am using a MacBook Pro with Apple silicon. To take advantage of the programs that can use this natively, homebrew creates a new directory (/opt/homebrew) that is functionally the same as /usr/local except that it holds the packages that are native to R rewritten for Apple silicon.
Thus, in Terminal in Mac OS X,
echo $PATH correctly returns
And I am able to use installed homebrew commands from the Terminal in Mac OS X.
But in RStudio IDE,
system("echo $PATH") returns
Note the missing "/opt/homebrew/bin:/opt/homebrew/sbin".
The same issue occurs if I open a new terminal window in RStudio IDE (Note: different than Terminal in Mac OS X) and type echo $PATH (the homebrew directories are missing.)
How do I permanently modify the PATH that RStudio uses to add "/opt/homebrew/bin:/opt/homebrew/sbin"?
(Please don't refer me to random StackOverflow articles—I have been through them and none of those options work. The RStudio application apparently does not look to the .bash_profile or the .zshrc profile when setting PATH. I even tried editing the Info.plist in RStudio.app directory to set the PATH there, but that did not work either.)