Skip to content

Function to generate random gender and ethnicity correct first and/or last names. Names are chosen proportionally based upon their probability of appearing in a large scale data base of real names.

License

Notifications You must be signed in to change notification settings

adamvi/randomNames

 
 

Repository files navigation

randomNames

R-CMD-check AppVeyor Build Status CRAN_Status_Badge Development Version Rstudio mirror downloads License https://gitter.im/CenterForAssessment/randomNames

Overview

The randomNames package contains a single function randomNames which creates random gender/ethnicity correct first and/or last names where names are proportionally sampled based upon their frequency in a large scale database.

Installation

From CRAN

To install the latest stable release of randomNames from CRAN

> install.packages("randomNames")

From Github

To install the development release of randomNames from GitHub:

> devtools::install_github("CenterForAssessment/randomNames")

Usage

> randomNames(5) ## 5 last, first names
[1] "Mossberg, Cassie"  "Mendiaz, Victoria" "Miner, Cassidy"    "Austin, Brook"     "Babcock, Lloyd"

> randomNames(5, gender=1) ## 5 female last, first names
[1] "Bruckner, Birva"   "Caringer, Madelyn" "Mendoza, Rebecca"  "el-Haque, Jaleela" "Williams, Miranda"

> randomNames(5, gender=0) ## 5 male last, first names
[1] "al-Salam, Rida"    "Debus, Kai"        "al-Aly, Jaabir"    "Garces, Markus"    "Robertson, Trevor"

> randomNames(5, gender=0, ethnicity=3) ## 5 African American, male last, first names
[1] "Bashir, Shaquille" "Ursery, Keilan"    "Marlow, Marvin"    "Bell, Daishavon"   "Hammond, Kyle"

> randomNames(5, gender=1, ethnicity=6, which.names="first") ## 5 Middle Eastern, female first names
[1] "Jawhara"  "Raaniya"  "Ghaada"   "Ghazaala" "Raabia"

Resources

Contributors

The randomNames Package is crafted with ❤️ by:

I love feedback and am happy to answer questions.

About

Function to generate random gender and ethnicity correct first and/or last names. Names are chosen proportionally based upon their probability of appearing in a large scale data base of real names.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 100.0%