Neither bike would be a mistake as they are considered by many to be at the top of the class, when in reality (for us normal folks) all of the current bikes are up there.
They both do something slightly better than the other, if you want to split hairs, although an advantage of one could work against you, but I wouldn't worry about it; ie, the YZ is more stable (but won't turn?!) although the RM turns better (but is nervious?!); the RM has a snappy response (wild or just right?) whereas the YZ the most over-rev (useful or unimportant?) In reality both can be made or modified to mimic the other somewhat - consider having one or the other no inconvience which cannot be corrected or tailored.
To me, any of them would be way far beyond my ability to use to its fullest, and I'd be a for sure hoot at how over the top they are in performance, esp. compared to what I am used to.
So if it's still that important, wait until you can get/bum a side-by-side ride, or take the plunge - pick the color you want, because either one is so good they are truely both winners.