It is quite hard to tell what's causing this problem unless we can look at a diagnostics report. Any number of reasons could result in such problems (R itself may be missing or not installed right).
Could you check that if you installed the R (not Rstudio) prior to RStudio installation? You can download it from the official website.
If you installed and the problem persists, the diagnostic report may help.
How to Run a Diagnostics Report