gender: Create Gender Variable

View source: R/gender.R

genderR Documentation

Create Gender Variable

Description

Often, there is need to differentiate between sex and gender. Many wonder if there is any difference at all. This function will create clarity between them.

Usage

gender(data)

Arguments

data

data frame containing Age and Sex variables

Value

The data.frame with:

Gender

data frame with two additional variables.

Examples

# df <- data.frame(Age = c(49, 30, 44, 37, 29, 56, 28, 26, 33, 45, 45, 19,
#   32, 22, 19, 28, 28, 36, 56, 34),
#  Sex = c("male", "female", "female", "male", "male", "male", "female",
#  "female", "Prefer not to say", "male", "male", "female", "female", "male",
#  "Non-binary/third gender", "male", "female", "female", "male", "male"))
#  gender(df)

JobNmadu/Dyn4cast documentation built on March 5, 2025, 9:56 p.m.