Republican candidate projected to have won the race to 270 Electoral College votes, The Associated Press says.