Begin with a plain Ubuntu distro from the Windows App Store. If one is already installed and you want to start from scratch simply:
wsl -t Ubuntu
wsl --unregister Ubuntu
Ubuntu
Then enter the user name and password and exit again.
Download the basic-wsl2-rstudio.sh
script to your Windows system and execute
wsl -d Ubuntu -u root -- ./basic-wsl2-rstudio.sh
Wait a few minutes (just under 5 on my system) and then
Ubuntu
rstudio &
If everything worked out you should be able to install binary packages from RStudio without issue. If you create a new markdown document then RStudio will prompt to download what you need.
Have fun!
Glad to hear it was of use! Thanks for leaving that information too, I'm sure it will come in useful to others as well.
I've been using a variety of settings in my build testing too...