2
I have the following dataframe:
data <- data.frame(Individuo=c("1","2","3","4","5","6"),
Sexo=c(2,4,4,2,4,2),Ocupaçao=c(1,1,2,2,1,2),
Raça=c("Branco","Negro","Pardo","Branco","Pardo","Branco"),
Estudo=c(10,12,14,16,13,11))
Where, in Sex the male individuals are represented by the number 2 and the female by the number 4, in Occupation the number 1 represents the occupied individuals and 2 represents the unemployed.
How do I calculate the following ratio,(Unoccupied)/(Occupied+Unoccupied)? (This is the formula for the unemployment rate)
In addition, is there any way to represent graphically (dispersion, lines or bars) such relation by different groups? For example, (Unoccupied)/(Occupied+Unoccupied) only for white males or any other combination accordingly.