<metaproperty="og:title"content="Determine first (weighted) isolates — first_isolate"/>
<metaproperty="og:description"content="Determine first (weighted) isolates of all microorganisms of every patient per episode and (if needed) per specimen type."/>
@ -404,19 +408,9 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
@@ -404,19 +408,9 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
@ -430,8 +424,8 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
@@ -430,8 +424,8 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
<spanclass='co'># B is more reliable because every isolate is only counted once.</span>
<spanclass='co'># Gentamicin resitance in hospital D appears to be 3.1% higher than</span>
<spanclass='co'># B is more reliable because every isolate is counted only once.</span>
<spanclass='co'># Gentamicin resitance in hospital D appears to be 3.7% higher than</span>
<spanclass='co'># when you (erroneously) would have used all isolates for analysis.</span>
@ -439,6 +433,14 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
@@ -439,6 +433,14 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
@ -450,19 +452,9 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
@@ -450,19 +452,9 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
<li><ahref="#read-more-on-our-website-">Read more on our website!</a></li>
<li><ahref="#see-also">See also</a></li>
<li><ahref="#examples">Examples</a></li>
</ul>
<navid="toc"data-toggle="toc"class="sticky-top">
<h2data-toc-skip>Contents</h2>
</nav>
</div>
</div>
@ -473,7 +465,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
@@ -473,7 +465,7 @@ The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</s
</div>
<divclass="pkgdown">
<p>Site built with <ahref="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.9000.</p>
<p>Site built with <ahref="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.0.</p>
@ -145,19 +145,9 @@ On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://
@@ -145,19 +145,9 @@ On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://
library(dplyr)
# Filter on first isolates:
example_isolates \%>\%
mutate(first_isolate = first_isolate(.,
col_date = "date",
col_patient_id = "patient_id",
col_mo = "mo")) \%>\%
mutate(first_isolate = first_isolate(.)) \%>\%
filter(first_isolate == TRUE)
# Which can be shortened to:
example_isolates \%>\%
filter_first_isolate()
# or for first weighted isolates:
example_isolates \%>\%
filter_first_weighted_isolate()
# Now let's see if first isolates matter:
A <- example_isolates \%>\%
group_by(hospital_id) \%>\%
@ -171,8 +161,8 @@ B <- example_isolates \%>\%
@@ -171,8 +161,8 @@ B <- example_isolates \%>\%