Installation error (-bash: R: command not found) in Mac

My Mac version is Intel Iris Plus Graphics 655 1536 MB and Ventura 13.2.1 (22D68).
I have downloaded R-4.2.3 and Studio from the website.
However, when I go to the "terminal" and type R, it says -bash: R: command not found.
Also, I can't open the Studio. If I open the Rstudio, it keep shows the message " R does not appear to be installed. Please install R before using RStudio. You can download R from the official R Project website. Would you like to go there now?"
Does anyone know how to fix it?
I have erased R and Rstudio from the application and reinstalled it several times, but it is not working.
(I even contacted the apple service center and they said to contact the software :()

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.