Description Usage Arguments Value Author(s) Examples
Returns an object that classifies inputted names according to 39 different leaf nationalities.
1 | get_nationalities(x, t = NULL, warnings = FALSE)
|
x |
A vector of names, in the form "First_name Last_name". If there are multiple segments separated by white spaces, only the first and the last segments are taken into account. |
t |
A string with the API access token. The default value is NULL, although you must set your own token. A Name-Prism API token can be obtained for research purposes to overcome the limit of anonymous API use. Please visit http://www.name-prism.com/api for more details. |
warnings |
Logical. If TRUE, then a warning message will be displayed when a name cannot be analyzed. The default value is FALSE. |
A data frame of dimensions length(x)*42, with the probability of belonging to each of the 39 different leaf CEL groups of the Name-Prism taxonomy (see http://www.name-prism.com/about). Errors (e.g. connection is interrupted, invalid tokens) are handled as NA.
Charles Crabtree ccrabtr@umich.edu and Christian Chacua christian-mauricio.chacua-delgado@u-bordeaux.fr
1 2 3 4 5 6 | # Vector of names.
x <- c("Charles Crabtree", "Volha Chykina", "Christian Chacua", "Christian Mauricio Chacua")
# Using the API token a1a2a34aa56789aa (you should get your own token)
y <- get_nationalities(x, t="a1a2a34aa56789aa", warnings=FALSE)
y
# "Christian Chacua" and "Christian Mauricio Chacua" have the same probabilities as "Mauricio" is not taken into account.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.