assign_gender: Infer people's gender

Description Usage Arguments Details Value Examples

View source: R/assign_gender.R

Description

Looks up for the gender of the personal names in x.

Usage

1

Arguments

x

A character vector.

Details

Unidentified genders are set as NA values.

Value

A character vector of the same length as x.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
x. = c("Carlos", "Martha", "not_a_name")
assign_gender(x.)


library(tidyverse)

edcn_genders <- edcn %>%
 separate(subject_name,
          into = c("family_names", "personal_name"),
          sep = ",") %>%
 mutate(gender = assign_gender(personal_name)) %>%
 select(1:2, gender, everything())

GuillermoNasarre/limpyr documentation built on Dec. 17, 2021, 10:25 p.m.