Error message on mac: R does not appear to be installed. Please install R before using RStudio.

R is installed and yet Rstudio does not recognise it. When I try open Rstudio I get the following error message pop-up: R does not appear to be installed. Please install R before using RStudio.

I have restarted my Macbook laptop and reinstalled both R and Rstudio multiple times. It still does not work and I am unable to open Rstudio. I have ensured that I have the most up to date versions of both.

Please can someone assist? It is urgent.

I know nothing about modern Macs but can you load R from the command line ? Or GUI ?