1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 13:21:50 +02:00

(v0.7.1.9062) mo/ab assignment improvements

This commit is contained in:
2019-08-26 16:02:03 +02:00
parent 13d4fef801
commit 7a6fce4eb8
19 changed files with 383 additions and 378 deletions

View File

@ -84,29 +84,22 @@ This AMR package honours this new insight. Use \code{\link{portion_SI}} to deter
When using more than one variable for \code{...} (= combination therapy)), use \code{only_all_tested} to only count isolates that are tested for all antibiotics/variables that you test them for. See this example for two antibiotics, Antibiotic A and Antibiotic B, about how \code{portion_SI} works to calculate the \%SI:
\preformatted{
-------------------------------------------------------------------------
only_all_tested = FALSE only_all_tested = TRUE
Antibiotic Antibiotic ----------------------- -----------------------
A B include as include as include as include as
numerator denominator numerator denominator
---------- ---------- ---------- ----------- ---------- -----------
S S X X X X
I S X X X X
R S X X X X
not tested S X X - -
S I X X X X
I I X X X X
R I X X X X
not tested I X X - -
S R X X X X
I R X X X X
R R - X - X
not tested R - - - -
S not tested X X - -
I not tested X X - -
R not tested - - - -
not tested not tested - - - -
-------------------------------------------------------------------------
--------------------------------------------------------------------
only_all_tested = FALSE only_all_tested = TRUE
----------------------- -----------------------
Drug A Drug B include as include as include as include as
numerator denominator numerator denominator
-------- -------- ---------- ----------- ---------- -----------
S or I S or I X X X X
R S or I X X X X
<NA> S or I X X - -
S or I R X X X X
R R - X - X
<NA> R - - - -
S or I <NA> X X - -
R <NA> - - - -
<NA> <NA> - - - -
--------------------------------------------------------------------
}
Please note that, in combination therapies, for \code{only_all_tested = TRUE} applies that:

View File

@ -80,29 +80,22 @@ The function \code{rsi_df} works exactly like \code{portion_df}, but adds the nu
When using more than one variable for \code{...} (= combination therapy)), use \code{only_all_tested} to only count isolates that are tested for all antibiotics/variables that you test them for. See this example for two antibiotics, Antibiotic A and Antibiotic B, about how \code{portion_SI} works to calculate the \%SI:
\preformatted{
-------------------------------------------------------------------------
only_all_tested = FALSE only_all_tested = TRUE
Antibiotic Antibiotic ----------------------- -----------------------
A B include as include as include as include as
numerator denominator numerator denominator
---------- ---------- ---------- ----------- ---------- -----------
S S X X X X
I S X X X X
R S X X X X
not tested S X X - -
S I X X X X
I I X X X X
R I X X X X
not tested I X X - -
S R X X X X
I R X X X X
R R - X - X
not tested R - - - -
S not tested X X - -
I not tested X X - -
R not tested - - - -
not tested not tested - - - -
-------------------------------------------------------------------------
--------------------------------------------------------------------
only_all_tested = FALSE only_all_tested = TRUE
----------------------- -----------------------
Drug A Drug B include as include as include as include as
numerator denominator numerator denominator
-------- -------- ---------- ----------- ---------- -----------
S or I S or I X X X X
R S or I X X X X
<NA> S or I X X - -
S or I R X X X X
R R - X - X
<NA> R - - - -
S or I <NA> X X - -
R <NA> - - - -
<NA> <NA> - - - -
--------------------------------------------------------------------
}
Please note that, in combination therapies, for \code{only_all_tested = TRUE} applies that: