I don't think you can go wrong with either one. I evaluated both, plus the Denon AVR-3313CI, eventually decided upon the 818, and am quite satisfied with it. My decision was partially due to the 818's Audyssey MultEQ XT32 which is superb.
I was already partial to Onkyo's sound quality which many consider to be "brighter" compared to Yamaha's "warmer" sound. It's difficult to objectively describe sound quality but I would think it's fair to describe Onkyo's sound as "punchy." Since my main application is movies I find Onkyo's approach to be preferable but this is a highly subjective criterion. So, much depends on your primary purpose for the receiver - movies or music.
The Yamaha has the advantage of AirPlay which is still conspicuously absent from the Onkyo line. Also, the dealer from whom I purchased the 818 said Yamaha has the lowest return rate of any receiver, whereas I had to return my first 818 for HDMI problems that seem to have plagued the Onkyo line since HDMI's inception.
Since you asked, you should also consider the Denon AVR-3313CI - just to complicate your decision. Audyssey MultEQ XT only, though. Denon has a strong following. If you had another $1000 to budget the decision becomes easier since I think the Denon AVR-4311CI would emerge as my favorite.
If you decide on the Yamaha I think you'll be pleased, and if you buy the Onkyo be sure to give it a workout before your "no questions asked" return period expires.