stRoke/man/cpr_dob.Rd

28 lines
668 B
Plaintext
Raw Normal View History

2022-09-22 14:20:46 +02:00
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cpr_tools.R
\name{cpr_dob}
\alias{cpr_dob}
\title{Extracting date of birth from CPR}
\usage{
2023-01-05 10:21:46 +01:00
cpr_dob(cpr, format = "\%d-\%m-\%Y")
2022-09-22 14:20:46 +02:00
}
\arguments{
2023-01-11 12:54:08 +01:00
\item{cpr}{cpr-numbers as ddmmyy"-."xxxx or ddmmyyxxxx.
Also mixed formatting. Vector or data frame column.}
2023-01-05 10:21:46 +01:00
\item{format}{character string of dob date format. Default is "\%d-\%m-\%Y".}
2022-09-22 14:20:46 +02:00
}
\value{
2023-01-05 10:21:46 +01:00
character vector
2022-09-22 14:20:46 +02:00
}
\description{
2022-09-26 13:59:05 +02:00
For easy calculation. Does not handle cprs with letters (interim cpr)
2022-09-22 14:20:46 +02:00
}
\examples{
cpr_dob("231045-0637")
2023-01-11 12:54:08 +01:00
fsd<-c("2310450637", "010190-2000", "010115-4000",
"300450-1030","010150-4021")
2022-09-22 14:20:46 +02:00
cpr_dob(fsd)
}
\keyword{cpr}