well, let's put it this way R5 > i5 in any case (unless you care about 2-3 extra fps and and you do only gaming), r7 is a not pure gaming CPU it's loosing to 7700k but it's wins if you do more with PC. Many said and I may repeat
Ryzen is future proof CPU and you know it's good to have competitor back on stage anyway!