gender: Predict genders from first names

Description Usage Arguments Value See Also Examples

View source: R/gender.R

Description

This function predicts the genders of a vector of first names.

Usage

1
gender(firstname, year_min = 1900, year_max = 2017, freq = FALSE)

Arguments

firstname

first name as a character string.

year_min

starting year of the period over which the prediction is computed.

year_max

ending year of the period over which the prediction is computed.

freq

return the probability of the first name being male

Value

The predicted genders based on the proportions of males and females with the input first names. Possible values are either "male" or "female". NAs are returned when the input first names are unknown in the database. If freq is set to TRUE, the function returns the probabilities of the first names being male.

See Also

gender_unique, is_male, is_female

Examples

1
gender(c("Baptiste", "Henriette")

pmerckle/firstnamer documentation built on May 3, 2019, 3:21 p.m.