# NOT RUN {
data(voters)
predict_race(voters, surname.only = TRUE)
predict_race(voter.file = voters, surname.only = TRUE)
# }
# NOT RUN {
predict_race(voter.file = voters, census.geo = "tract", census.key = "...", age = TRUE)
# }
# NOT RUN {
predict_race(voter.file = voters, census.geo = "tract", census.key = "...",
party = "PID")
# }
# NOT RUN {
CensusObj <- get_census_data("...", state = c("NY", "DC", "NJ"));
predict_race(voter.file = voters, census.geo = "tract", census.data = CensusObj, party = "PID")
# }
# NOT RUN {
CensusObj2 <- get_census_data("...", state = c("NY", "DC", "NJ"), age = TRUE, sex = TRUE);
predict_race(voter.file = voters, census.geo = "tract", census.data = CensusObj2, party = "PID",
age = TRUE, sex = TRUE)
# }
Run the code above in your browser using DataLab