mirror of
https://github.com/agdamsbo/daDoctoR.git
synced 2024-11-21 19:30:22 +01:00
24 lines
504 B
R
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}
|