year: Predict years of birth from first names

Description Usage Arguments Value Examples

View source: R/gender.R

Description

This function predicts the years of birth of individuals from a vector of first names.

Usage

1
year(firstname, year_min = 1946, year_max = 2017)

Arguments

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 years of birth based on the proportions of individuals with the input first names born each year. The function returns the modes of the distributions, i.e. the years with the highest numbers of individuals born by the input firstnames. NAs are returned when the input first names are unknown in the database.

Examples

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

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