daDoctoR/man/age_calc.Rd

24 lines
504 B
R

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/age_calc.R
\name{age_calc}
\alias{age_calc}
\title{Calculating age from date of birth}
\usage{
age_calc(dob, enddate = Sys.Date(), units = "years", precise = TRUE)
}
\arguments{
\item{dob}{Date of birth.}
\item{enddate}{Date to calculate age at.}
}
\description{
For age calculations.
}
\examples{
##Kim Larsen
dob<-dob_extract_cpr("231045-0637")
date<-as.Date("2018-09-29")
trunc(age_calc(dob,date))
}
\keyword{age}