https://github.com/karthik/randNames
Random username (+other useful info) generator
https://github.com/karthik/randNames
Last synced: 5 months ago
JSON representation
Random username (+other useful info) generator
- Host: GitHub
- URL: https://github.com/karthik/randNames
- Owner: karthik
- License: other
- Created: 2015-03-05T01:06:59.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-07-12T20:03:41.000Z (almost 8 years ago)
- Last Synced: 2024-12-02T20:23:56.734Z (5 months ago)
- Language: R
- Homepage:
- Size: 257 KB
- Stars: 12
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - karthik/randNames - Random username (+other useful info) generator (R)
README
# Random names
[](https://travis-ci.org/karthik/randNames) [](https://coveralls.io/r/karthik/randNames) [](https://cran.r-project.org/package=randNames) [](http://cran.rstudio.com/web/packages/randNames/index.html)
The package provides a programmatic interface to the Random Names API and returns 'sample' user data including fake first/last names, emails, SSNs, addresses, avatars and more. Search queries can be further filtered by gender and nationality.
```{r, echo = FALSE, message = FALSE}
knitr::opts_chunk$set(
comment = "#>",
cache = FALSE,
error = FALSE,
message = FALSE,
tidy = FALSE
)
```**Installation**
```{r, eval = FALSE}
install.packages("randNames")
````or for the development version
```{r, eval = FALSE}
devtools::install_github("karthik/randNames")
```It queries a random name API and returns a whole bunch of useful fields.
```{r, names, cache = TRUE}
library(dplyr)
library(randNames)
20 %>%
rand_names %>%
select(first = name.first, last = name.last)
```__Filter by nationality__
```{r, nationality, cache = TRUE}
15 %>%
# Available nationalities: AU, BR, CA, CH, DE, DK, ES, FI, FR, GB, IE, IR, NL, NZ, TR, US
# You can specify multiple nationalities. e.g. "gb,us"
rand_names(nationality = "GB") %>%
select(name.first, name.last)
```__Filter by gender__
```{r, gender}
library(randNames)
15 %>%
rand_names(gender = "female") %>%
select(name.first, name.last)
```__Set seed__
```{r, seed}
15 %>%
rand_names(seed = 'foobar') %>%
select(name.first, name.last)
```__Additional fields beyond first and last name__
```
gender
registered"
dob
phone
cell
nat
name.title
name.first
name.last
location.street
location.city
location.state
location.postcode
login.username"
login.password
login.salt
login.md5
login.sha1
login.sha256
id.name
id.value
picture.large
picture.medium
picture.thumbnail
```