BINPREFmust be set toC:/Rtools/mingw_$(WIN)/bin/(/are important)- Rtools must be on the path:
C:\\Rtools\\bin\\;(/less important)
This will make installation ok no matter the 📦 (like remotes)
install.packages in rstudio is not directly utils::install.packages(). There is some things set after some verification. Like setting BINPREF.