Likely. You can try putting
CXX = "C:\Rtools\mingw_64\bin\g++"
into the file located at ~/.R/Makevars.
~/.R/Makevars