It would be nice to be able to know the total number of unique poststratification categories - e.g., given a mapping:
> marstat_mapping = list(
+ "Married" = "Married",
+ "Separated" = "Separated",
+ "Divorced" = "Divorced",
+ "Widowed" = "Widowed",
+ "Never married" = "Never married",
+ "Domestic / civil partnership" = "Married"
+ )
> q_marstat <- SurveyQuestion$new(name = "marstat",
+ col_names = c("marstat", "marst2"),
+ values_map= marstat_mapping)
the call q_marstat.values() returns a list of length 6:
> q_marstat$values()
marstat marst2
1 Married Married
2 Separated Separated
3 Divorced Divorced
4 Widowed Widowed
5 Never married Never married
6 Domestic / civil partnership Married
but only increases the size of the poststrat table by a factor of 5.