'SUMIF rows equivalent in R

I am looking to produce summary rows in R so that a table like this:

Region Area Numerator Denominator
North AreaA 1 10
North AreaB 1 10
South AreaC 1 10
South AreaD 1 10

Becomes this:

Region Numerator Denominator
North 2 20
South 2 20

Very simple I'm sure for someone who understands the equivalent of SUMIF (Excel) for R. I have looked at other questions but am too new to R to figure this out. Any help very much appreciated.

r


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source