I assume you already are running homebrew. If not, please install it from https://brew.sh
After you have Homebrew installed it's simple to install R and R-Studio with the following commands.
brew install r
brew cask install rstudio
Some other useful brew commands.
brew uninstall r
brew cask uninstall rstudio