Learn R Programming

MAPLES (version 1.0)

mkdate: Compute dates.

Description

Computes dates in continuous years or CMC (Century Month Code) since January 1, 1900.

Usage

mkdate(year, month, cmc = FALSE)

Arguments

year
a vector containing the year of a date(XXXX format)
month
a vector containing the month of a date (XX format)
cmc
if TRUE date in CMC from January 1, 1900 is computed. Otherwise, date in continuos time since January 1, 1900 is computed.

Value

References

Impicciatore R. and Billari F.C., (2010), MAPLES: a general method for the estimation of age profiles from standard demographic surveys (with an application to fertility), DEAS WP, http://ideas.repec.org/p/mil/wpdepa/2010-40.html

Examples

Run this code
dy<-c(1996,2001,2005,2003)
dm<-c(3,9,5,12)
mkdate(year=dy,month=dm)
mkdate(year=dy,month=dm, cmc=TRUE)

Run the code above in your browser using DataLab