test_age: Function to check the format of 'age' in data

View source: R/IPDFilecheck.R

test_ageR Documentation

Function to check the format of 'age' in data

Description

Function to check the format of 'age' in data

Usage

test_age(data, agecolumn = "age", nrcode = NA)

Arguments

data

a data frame

agecolumn

column name that corresponds to age or date pf birth

nrcode

non response code corresponding to age column

Value

0, if success error if failure

Examples

df <- data.frame("Age" = c(21, 15), "Name" = c("John", "Dora"))
test_age(df, "age", 999)

sheejamk/ipdfilecheck documentation built on March 10, 2024, 11:23 p.m.