diff --git a/ChangeLog b/ChangeLog index 36bbd2a..40b4298 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,4 +19,5 @@ Date Version Comment 2024-02-15 3.0.0 Adding back age and sex functionality. Other improvements. 2024-02-27 3.0.1 Github has changed their policy on binary formats in releases, need to refer to older version 2024-04-02 3.0.2 Fixes a bug that led to overestimation of black and hispanic populations (see issue #145) -2024-05-24 3.0.3 Fixes a bug that pushed NaN into small population tracts (see issue #151) \ No newline at end of file +2024-05-24 3.0.3 Fixes a bug that pushed NaN into small population tracts (see issue #151) +2024-06-07 3.0.4 Fixes a bug related to a list of variables not being unnested properly (issue #151, #153) \ No newline at end of file diff --git a/DESCRIPTION b/DESCRIPTION index 42a23bb..94dc35c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: wru Title: Who are You? Bayesian Prediction of Racial Category Using Surname, First Name, Middle Name, and Geolocation -Version: 3.0.3 -Date: 2024-05-24 +Version: 3.0.4 +Date: 2024-06-07 Authors@R: c( person("Kabir", "Khanna", , "kabirkhanna@gmail.com", role = "aut"), person("Brandon", "Bertelsen", , "brandon@bertelsen.ca", role = c("aut", "cre")), diff --git a/R/census_helper_v2.R b/R/census_helper_v2.R index 9b51bd3..fad323b 100644 --- a/R/census_helper_v2.R +++ b/R/census_helper_v2.R @@ -182,7 +182,7 @@ census_helper_new <- function( } drop <- match(c("state", unlist(vars_)), names(census)) - geoPopulations <- rowSums(census[,names(census) %in% vars_]) + geoPopulations <- rowSums(census[,names(census) %in% unlist(vars_)]) census$r_whi <- rowSums(census[, vars_[["r_whi"]], drop = FALSE]) / (geoPopulations) #Pr(White | Geo) census$r_bla <- rowSums(census[, vars_[["r_bla"]], drop = FALSE]) / (geoPopulations) #Pr(Black | Geo)