G++ Compile Error With R Package

Put it in the ~/.R/Makefiles.win file like

CXX14 = C:/Rtools/mingw_64/bin/g++