baseline {GenderInfer}R Documentation

Calculate the female baseline

Description

baseline calculate the female baseline giving a dataframe containing the gender information.

Usage

baseline(data_df, gender_col)

Arguments

data_df

dataframe containing the gender column.

gender_col

the name of the column containing the gender information.

Value

The function returns a numeric vector containing the baseline values

Examples

## df is the dataframe in output from the function assign_gender
df <- data.frame(first_name = c("anna", "john", "ernest", "colin", "aileen"),
                 gender = c("F", "M",  "M", "M", "F"),
                 stringsAsFactors = FALSE)
baseline <- baseline(df, gender_col = "gender")

[Package GenderInfer version 0.1.0 Index]