Description Usage Arguments Value Author(s) Examples
Converts dates at transition to dates in another format or to ages
1 | date_convert(d,format.in,selectday,format.out,born,format.born)
|
d |
A vector of dates to be converted |
format.in |
Format of input date |
selectday |
If input date is in CMC, selectday gives the day of the month. Default is 1 |
format.out |
Format of output date |
born |
Date of birth for computation of age. Format the date of birth is format.in. May be omitted, unless date at transition need to be converted to age |
format.born |
Format of date of birth |
date |
Dates at transition. Object of class 'Date'(number of days since 1970-01-01) |
datep |
Dates for printing |
Frans Willekens
1 2 3 4 5 6 7 | data(GLHS)
b <- date_convert(d='01/01/2011',format.in='%m/%d/%Y',selectday=1,format.out='day-month-year')
dd <- GLHS$marriage
fo <- 'day-mon-year'
gb <- GLHS$born
bb<- date_convert(d=dd,format.in="CMC",selectday=1,format.out=fo,born=gb,format.born="CMC")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.