I have a data frame of data of demographics in R
Name...Region...Gender
...A...........1.............F
...B...........2.............M
...C...........1.............F
...D...........1.............M
...E...........2.............M
I want to calculate gender ratio for every region. Output should look like:
Region ..........GenderRatio
.... 1........................(0.67)
.... 2........................(0.50)
This can be calculated using normal BODMAS usage. Is there any efficient way to calculate it in R?