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