mirror of
https://github.com/agdamsbo/daDoctoR.git
synced 2024-11-25 05:01:54 +01:00
examples
This commit is contained in:
parent
8be45013f1
commit
cc48f5cac4
@ -6,7 +6,10 @@
|
||||
#' @keywords age
|
||||
#' @export
|
||||
#' @examples
|
||||
#' age_calc()
|
||||
#' ##Kim Larsen
|
||||
#' dob<-dob_extract_cpr("231045-0637")
|
||||
#' date<-as.Date("2018-09-29")
|
||||
#' trunc(age_calc(dob,date))
|
||||
|
||||
age_calc<-function (dob, enddate = Sys.Date(), units = "years", precise = TRUE)
|
||||
## Build upon the work of Jason P. Becker, as part of tihe eeptools
|
||||
|
@ -5,7 +5,7 @@
|
||||
#' @keywords cpr
|
||||
#' @export
|
||||
#' @examples
|
||||
#' cpr_check()
|
||||
#' cpr_check("231045-0637")
|
||||
|
||||
cpr_check<-function(x){
|
||||
#Check validity of CPR number, format ddmmyy-xxxx
|
||||
|
@ -5,7 +5,7 @@
|
||||
#' @keywords cpr
|
||||
#' @export
|
||||
#' @examples
|
||||
#' cpr_sex()
|
||||
#' cpr_sex("231045-0637")
|
||||
|
||||
cpr_sex<-function(x){
|
||||
##Input as vector of DK cpr numbers, format "ddmmyy-xxxx", returns sex according to cpr
|
||||
|
@ -5,7 +5,7 @@
|
||||
#' @keywords cpr
|
||||
#' @export
|
||||
#' @examples
|
||||
#' dob_extract_cpr()
|
||||
#' dob_extract_cpr("231045-0637")
|
||||
|
||||
|
||||
dob_extract_cpr<-function(cpr)
|
||||
|
@ -15,6 +15,9 @@ age_calc(dob, enddate = Sys.Date(), units = "years", precise = TRUE)
|
||||
For age calculations.
|
||||
}
|
||||
\examples{
|
||||
age_calc()
|
||||
##Kim Larsen
|
||||
dob<-dob_extract_cpr("231045-0637")
|
||||
date<-as.Date("2018-09-29")
|
||||
trunc(age_calc(dob,date))
|
||||
}
|
||||
\keyword{age}
|
||||
|
@ -13,6 +13,6 @@ cpr_check(x)
|
||||
Checking validity of cpr number
|
||||
}
|
||||
\examples{
|
||||
cpr_check()
|
||||
cpr_check("231045-0637")
|
||||
}
|
||||
\keyword{cpr}
|
||||
|
@ -13,6 +13,6 @@ cpr_sex(x)
|
||||
Format "ddmmyy-xxxx"
|
||||
}
|
||||
\examples{
|
||||
cpr_sex()
|
||||
cpr_sex("231045-0637")
|
||||
}
|
||||
\keyword{cpr}
|
||||
|
@ -13,6 +13,6 @@ dob_extract_cpr(cpr)
|
||||
For easy calculation.
|
||||
}
|
||||
\examples{
|
||||
dob_extract_cpr()
|
||||
dob_extract_cpr("231045-0637")
|
||||
}
|
||||
\keyword{cpr}
|
||||
|
Loading…
Reference in New Issue
Block a user