The 2001 YZ was dominant in the class. It was ahead of the CR in the shootouts. That version of the CR frame was claimed to be stiff and several improvements have been made since.
I've owned several CR's and YZ's, I like them both. That being said, I think the YZ is the better of the two bikes that you have chosen.
Keep in mind that people will buy what they want regardless of others opinions, buy what looks and feels best to you.
Bars, tires, chain & sprockets condition, plastic, etc...
All that stuff costs money if it needs to be replaced.
good luck