Welcome to the site. What kind of riding will you be doing mostly?
The 450R is a beast, no other 450 pulls as hard out of turns as the TRX450. The 450R is also a fast/high revving machine. She does not like to be ridden in low RPMs. You can but it takes a lot of clutch work to use the low end of the power on the 450R. The TRX is also one of the best handling 450s which makes it a good choice for a trail ridden 450 or a track machine. The TRX450R is the choice of many top notch Baja 1000/SCORE racers.
The 400ex is one of the greatest all around quads EVER. The EX will hang with the R until early 4th gear then the R will leave it. The EX has reverse and is so rider friendly it is crazy. You can hold 2nd or 3rd gear almost the whole time on tight trails. The EX can lug way down into the RPM range for the slow going area. It can also be upgraded to be faster and better than the R but that will cost you.
Both machines respond extremely well to upgrades and the aftermarket parts list goes on for days.