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

Description Usage Arguments Value Examples

View source: R/IPDFilecheck.R

Description

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

Usage

1
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

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

IPDFileCheck documentation built on Feb. 22, 2021, 5:07 p.m.