test_gender {IPDFileCheck}R Documentation

Function to check the format of 'gender' column in data

Description

Function to check the format of 'gender' column in data

Usage

test_gender(data, gendercode, gendercolumn = "gender", nrcode = NA)

Arguments

data

a data frame

gendercode

how gender is coded

gendercolumn

column name for gender

nrcode

non response code corresponding to gender column

Value

0, if success error if failure

Examples

test_gender(data.frame("sex" = c("m", "f"), "Name" = c("John", "Dora")),
c("f", "m"), "sex", 999)

[Package IPDFileCheck version 0.8.1 Index]