The script works well for MacOS. I found two things I had to change/remember
- make the script executable on Mac (Definieren einer Datei als ausführbar in Terminal auf dem Mac - Apple Support (DE))
- change the version number in the script to R 4.0.0
On Windows you would have to install a new version of RTools in oder to get R 4.0 up and ruinning
https://cran.r-project.org/bin/windows/Rtools/