Learn R Programming

packDAMipd (version 1.1.0)

get_gender_details: Function to get the details of the gender column

Description

Function to get the details of the gender column

Usage

get_gender_details(trialdata)

Value

the name of the variable related to gender and the unique contents if success, else error

Arguments

trialdata,

data containing individual level trial data

Details

expecting the data contains the information on gender preferably column names "gender", "sex" or "male" or "female". If multiple column names match these, then first match will be chosen.

Examples

Run this code
get_gender_details(data.frame("Age" = c(21, 15), "sex" = c("m", "f")))

Run the code above in your browser using DataLab