daDoctoR/man/age_calc.Rd

24 lines
504 B
Plaintext
Raw Normal View History

2018-10-02 21:07:43 +02:00
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/age_calc.R
2018-10-02 21:07:43 +02:00
\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{
2018-10-04 17:04:15 +02:00
##Kim Larsen
dob<-dob_extract_cpr("231045-0637")
date<-as.Date("2018-09-29")
trunc(age_calc(dob,date))
2018-10-02 21:07:43 +02:00
}
\keyword{age}