mirror of
https://github.com/agdamsbo/stRoke.git
synced 2024-11-22 04:50:23 +01:00
edit age_calc
This commit is contained in:
parent
7321e2d8a9
commit
2a86a2f051
@ -12,7 +12,7 @@
|
|||||||
#'
|
#'
|
||||||
#' @examples
|
#' @examples
|
||||||
#' # Kim Larsen (cpr is known from album)
|
#' # Kim Larsen (cpr is known from album)
|
||||||
#' dob<-daDoctoR::dob_extract_cpr("231045-0637")
|
#' dob<-as.Date("1945-10-23")
|
||||||
#' date<-as.Date("2018-09-30")
|
#' date<-as.Date("2018-09-30")
|
||||||
#' trunc(age_calc(dob,date))
|
#' trunc(age_calc(dob,date))
|
||||||
|
|
||||||
|
@ -2,5 +2,5 @@ pandoc: 2.19.2
|
|||||||
pkgdown: 2.0.6
|
pkgdown: 2.0.6
|
||||||
pkgdown_sha: ~
|
pkgdown_sha: ~
|
||||||
articles: {}
|
articles: {}
|
||||||
last_built: 2022-09-22T17:52Z
|
last_built: 2022-09-22T17:56Z
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
<div class="section level2">
|
<div class="section level2">
|
||||||
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
|
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
|
||||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># Kim Larsen (cpr is known from album)</span></span></span>
|
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># Kim Larsen (cpr is known from album)</span></span></span>
|
||||||
<span class="r-in"><span> <span class="va">dob</span><span class="op"><-</span><span class="fu">daDoctoR</span><span class="fu">::</span><span class="fu"><a href="https://rdrr.io/pkg/daDoctoR/man/dob_extract_cpr.html" class="external-link">dob_extract_cpr</a></span><span class="op">(</span><span class="st">"231045-0637"</span><span class="op">)</span></span></span>
|
<span class="r-in"><span> <span class="va">dob</span><span class="op"><-</span><span class="fu"><a href="https://rdrr.io/r/base/as.Date.html" class="external-link">as.Date</a></span><span class="op">(</span><span class="st">"1945-10-23"</span><span class="op">)</span></span></span>
|
||||||
<span class="r-in"><span> <span class="va">date</span><span class="op"><-</span><span class="fu"><a href="https://rdrr.io/r/base/as.Date.html" class="external-link">as.Date</a></span><span class="op">(</span><span class="st">"2018-09-30"</span><span class="op">)</span></span></span>
|
<span class="r-in"><span> <span class="va">date</span><span class="op"><-</span><span class="fu"><a href="https://rdrr.io/r/base/as.Date.html" class="external-link">as.Date</a></span><span class="op">(</span><span class="st">"2018-09-30"</span><span class="op">)</span></span></span>
|
||||||
<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/Round.html" class="external-link">trunc</a></span><span class="op">(</span><span class="fu">age_calc</span><span class="op">(</span><span class="va">dob</span>,<span class="va">date</span><span class="op">)</span><span class="op">)</span></span></span>
|
<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/Round.html" class="external-link">trunc</a></span><span class="op">(</span><span class="fu">age_calc</span><span class="op">(</span><span class="va">dob</span>,<span class="va">date</span><span class="op">)</span><span class="op">)</span></span></span>
|
||||||
<span class="r-out co"><span class="r-pr">#></span> [1] 72</span>
|
<span class="r-out co"><span class="r-pr">#></span> [1] 72</span>
|
||||||
|
File diff suppressed because one or more lines are too long
@ -23,7 +23,7 @@ For age calculations. Vectorised.
|
|||||||
}
|
}
|
||||||
\examples{
|
\examples{
|
||||||
# Kim Larsen (cpr is known from album)
|
# Kim Larsen (cpr is known from album)
|
||||||
dob<-daDoctoR::dob_extract_cpr("231045-0637")
|
dob<-as.Date("1945-10-23")
|
||||||
date<-as.Date("2018-09-30")
|
date<-as.Date("2018-09-30")
|
||||||
trunc(age_calc(dob,date))
|
trunc(age_calc(dob,date))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user