knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
The only required parameter is
name which is the surname you want to find the race of. Please note that this parameter only accepts surnames, including both first and last name will result in not finding a match in the Census data.
This function accepts a single string or a vector of strings.
predict_race(c("Washington", "Franklin", "Lincoln"))
If you only want the most likely race and not the individual probabilities of each race, set the parameter
probability to FALSE.
predict_race("Washington", probability = FALSE)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.