rand_names: Random name generator

Description Usage Arguments Details Examples

View source: R/rand_names.R

Description

This function grabs a list of random names from the random user generator

Usage

1
2
rand_names(n = 1, seed = NULL, gender = NULL, nationality = NULL,
  key = NULL)

Arguments

n

Number of names required. Free users get 100 max and registered RandomAPI users get 500 max. Register for a free API key here: https://randomapi.com

seed

A random string to ensure same results

gender

male or female

nationality

Currently takes: AU, BR, CA, CH, DE, DK, ES, FI, FR, GB, IE, IR, NL, NZ, TR, US

key

An API key for more results per request (500 max for registered RandomAPI users).

Details

The return object contains the following fields: seed, user.password, user.sha256, user.cell, user.name.title, user.location.city, user.picture.medium, user.gender, user.salt, user.registered, user.SSN, user.name.first, user.location.state, user.picture.thumbnail, user.email, user.md5, user.dob, user.version, user.name.last, user.location.zip, user.NINO, user.username, user.sha1, user.phone, user.nationality, user.location.street, user.picture.large.

Examples

1
2
3
4
5
6
7
data <- rand_names(5)
# dplyr::select(data, first = name.first, last = name.last)

 # x <- 5 %>%
 #   rand_names %>%
 # dplyr::filter(gender == "female") %>%
 #  dplyr::select(name.first, name.last)

karthik/randNames documentation built on May 20, 2019, 7:22 a.m.