calculateAgeFromDob

Function to calculate age from date of birth

Function to calculate age from date of birth

Usage
calculateAgeFromDob(data, columnname, dateformat = FALSE, nrcode = NA)
Arguments
data

a data frame

columnname

name of column corresponding to date of birth

dateformat

format of date e.g. dmy default is FALSE

nrcode

non response code corresponding to date of birth

Value

data if success -1 if failure

Aliases
  • calculateAgeFromDob
Examples
# NOT RUN {
calculateAgeFromDob(data.frame("dob" = c("1987-05-28","1987-06-18")),"dob","%y-%m-%d")
# }
Documentation reproduced from package IPDFileCheck, version 0.3.0, License: CC0

Community examples

Looks like there are no examples yet.