year_unique: Predict year from first name

Description Usage Arguments Value Examples

View source: R/gender.R

Description

This function predicts the year of birth from a first name.

Usage

1
year_unique(first_name, year_min = 1946, year_max = 2017)

Arguments

first_name

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.

Value

The predicted year of birth based on the proportions of individuals with the input first name born each year. The function returns the mode of the distribution, i.e. the year with the highest number of individuals born by the input firstname. NA is returned when the input first name is unknown in the database.

Examples

1
2
year("Baptiste")
year("Henriette")

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