Closed aniruhil closed 6 years ago
I figured it out: you have to specify AGECAT, RACECAT, SEXCAT with AGE_DESC, RACE_DESC, SEX_DESC in order for each group to be pulled. Just specifying the *_DESC variables defaults to whatever group is assigned a category value of 0.
Not sure why this would be preferred behavior over allowing one to specify just the more informative *_DESC variables (since they have labels).
Glad you were able to figure it out! My understanding is that the CAT variables are the required category selectors and DESC only describes the category variables that were pulled. I believe you can use CAT without DESC to get a specific type, but not the reverse.
sahie16 <- getCensus(name = "timeseries/healthins/sahie", vars = c("NAME", "AGE_DESC", "RACE_DESC", "SEX_DESC", "IPRCAT", "IPR_DESC", "PCTUI_PT", "PCTUI_LB90", "PCTUI_UB90", "PCTUI_MOE"), region = "county:*", regionin = "state:39", time = 2016)
This does not generate all RACE or AGE or SEX categories.
Instead, I get
What am I doing wrong in asking for specific variables but all categories?