Skip to content

Commit

Permalink
fixing household size calculation again
Browse files Browse the repository at this point in the history
  • Loading branch information
l-gorman committed Aug 18, 2023
1 parent b80bad3 commit 528f102
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/HouseholdSize.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ identify_person_category <- function(age, gender) {
gender <- substr(tolower(gender),0,1)

vector[age < 4] <- "children_under_4"
vector[age >= 4 & age < 1] <- "children_4to10"
vector[age > 11 & age <= 24 & gender == "m"] <- "males11to24"
vector[age > 11 & age <= 24 & gender == "f"] <- "females11to24"
vector[age >= 4 & age < 10] <- "children_4to10"
vector[age >= 11 & age <= 24 & gender == "m"] <- "males11to24"
vector[age >= 11 & age <= 24 & gender == "f"] <- "females11to24"
vector[age > 24 & age <= 50 & gender == "m"] <- "males25to50"
vector[age > 24 & age <= 50 & gender == "f"] <- "females25to50"
vector[age > 50 & gender == "m"] <- "malesover50"
Expand Down

0 comments on commit 528f102

Please sign in to comment.