Description Usage Arguments Value Examples
gen_lastname
randomly sample a lastname from the selected database:
country
If is 'uk', the function will automatically sample a
lastname. from a extracted lastname database. The lastname database was extracted
from ONS.
If country
is 'us', the function will automatically sample a
lastname. that based on the race
. The us lastname database was extracted
from randomNamesData
.
1 | gen_lastname(country = "uk", race = NA)
|
country |
A string variable with a default of 'uk'. It is either 'uk' or 'us'. |
race |
A number or a string of the ethnicity code: 1 American Indian or Native Alaskan, 2 Asian or Pacific Islander, 3 Black (not Hispanic), 4 Hispanic, 5 White (not Hispanic) and 6 Middle-Eastern, Arabic. |
A name string.
1 2 3 | gen_lastname(country = "uk")
gen_lastname(country = "us", race = 2)
gen_lastname(country = "us", race = 'Hispanic')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.