My favorite Error in unserialize is back :-)

I’m not 100% where the R PATH comes from. I certainly didn’t need to add anything to my system PATH, and I think I didn’t have any extra paths left over from a previous install.

See if you have the files .R/Makevars or .R/Makevars.win or .Renviron and either delete them or rename then and follow the directions here and see if this works: R 4.0, rstan, and you

I think it would be a good to try to remove any of the straggling rtools 3.5 stuff you see.