Bingo, we have a winner.
Fed has been more dominant versus the field than Rafa. This is fact, and evidenced by his larger number of slams and weeks at #1. (Of course their careers are not over yet, so it's possible Rafa will catch up, although I don't personally think it's likely.)
Rafa is head-to-head a better player than Fed. This is fact - they are about even on non-clay surfaces, and Rafa has an overwhelming advantage on clay. (As above, since their careers are not over yet, it's possible Fed will catch up, but I don't personally think it's likely.)
Give them both credit for being all-time greats. As for which is greater, it depends on how much weight you give to who is better one-on-one versus who has been more dominant vs the field.
Personally I think dominance vs the field is the more significant, so I rate Fed higher than Rafa (but will change my mind if Rafa wins several more slams and/or spends a lot more time at #1).