I installed R and then RStudio (I tried older versions too).
Installation was successful and I am able to open Rstudio.
However, I can NOT create a new Notebook. I keep getting the message "Notebook Creation Failed".
I tried to reinstall R and Rstudio but had no success.
before opening the new Notebook, I uploaded additional packages as RStudio requested.
There was a message during the "markdown" installation
This error can be caused by many things, such as having an old R installation (earlier than 4.0). Most commonly among macOS users, however, is attempting to install a package from source, rather than binary. This happens when getting a message "a binary version is available, but a source is later" and asking if you want to install from source. Most users should respond "no" and let the binary source be installed.
The problem shown in the screenshot (barely legible) is an error in the code for the digest package, so you might try
For M1, you should use the R-4.1.2-arm64.pkg. The R-4.1.2 is for Intel-based Macs. In general, keep the R version at or near the latest point release— so if you have 4.1 installed, it's usually ok to skip 4.2 or even 4.3, although some packages will eventually break. The R 3.6 and 3.3 versions do not support all current packages and it shouldn't be installed unless there is a specific need.
I recommend installing the pkg for the user that you are usually signed in to. Installing for "all users" may require administrator to update packages.
R and RStudio can be installed in either order, but RStudio won't operate without R, but the R app can operate without RStudio.