The path of least resistance, sorry to say, is to upgrade to Catalina, install XCode from the App Store and its CLI with
xcode-select -p
install R directly from the CRAN binary (not with brew or Anaconda). This is what I have on my own laptop, and I have had minimal problems all around.