baseline: Calculate the female baseline

Description Usage Arguments Value Examples

View source: R/baseline.R

Description

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

Usage

1
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

1
2
3
4
5
## 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")

GenderInfer documentation built on Sept. 29, 2021, 9:07 a.m.