My datafram currently looks like this:
ID <- c(1, 2, 3, 4, 5, 6, 7)
Sex <- c(M, F, F, M, F, M, F)
Sector <- (Agri, Hospitality, Textiles, Agri, Manufacturing, Education, Agri)
Weights <- (1359.7148, 516.4853, 435.0078, 1722.3962,1481.6194, 1133.3163, 1558.3099)
Data <- data.frame(ID, Sex, Sector, Weights)
How should I go about calculating what the percentage of the population is in each Sector
, by sex
. I would also like to ask that when calculation percentages, should I sum Weights
or should I sum over the number of observations I have.
Thank you very much.