1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 14:01:55 +02:00

(v0.7.1.9006) new rsi calculations, atc class removal

This commit is contained in:
2019-07-02 16:48:52 +02:00
parent 156d550895
commit 4ff20af123
21 changed files with 48 additions and 43 deletions

View File

@ -145,6 +145,7 @@ On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://
}
\examples{
\donttest{
# These examples all return "B_STPHY_AUR", the ID of S. aureus:
as.mo("sau") # WHONET code
as.mo("stau")
@ -179,7 +180,7 @@ as.mo("S. pyogenes", Lancefield = TRUE) # will not remain species: B_STRPT_GRA
# All mo_* functions use as.mo() internally too (see ?mo_property):
mo_genus("E. coli") # returns "Escherichia"
mo_gramstain("E. coli") # returns "Gram negative"#'
}
\dontrun{
df$mo <- as.mo(df$microorganism_name)

View File

@ -109,12 +109,12 @@ not tested not tested - - - -
-------------------------------------------------------------------------
}
Please note that for \code{only_all_tested = TRUE} applies that:
Please note that, in combination therapies, for \code{only_all_tested = TRUE} applies that:
\preformatted{
count_S() + count_I() + count_R() == count_all()
portion_S() + portion_I() + portion_R() == 1
}
and that for \code{only_all_tested = FALSE} applies that:
and that, in combination therapies, for \code{only_all_tested = FALSE} applies that:
\preformatted{
count_S() + count_I() + count_R() >= count_all()
portion_S() + portion_I() + portion_R() >= 1

View File

@ -69,7 +69,7 @@ These functions can be used to calculate the (co-)resistance of microbial isolat
\details{
\strong{Remember that you should filter your table to let it contain only first isolates!} This is needed to exclude duplicates and to reduce selection bias. Use \code{\link{first_isolate}} to determine them in your data set.
These functions are not meant to count isolates, but to calculate the portion of resistance/susceptibility. Use the \code{\link[AMR]{count}} functions to count isolates. \emph{Low counts can infuence the outcome - these \code{portion} functions may camouflage this, since they only return the portion albeit being dependent on the \code{minimum} parameter.}
These functions are not meant to count isolates, but to calculate the portion of resistance/susceptibility. Use the \code{\link[AMR]{count}} functions to count isolates. The function \code{portion_SI()} is essentially equal to \code{count_SI() / count_all()}. \emph{Low counts can infuence the outcome - the \code{portion} functions may camouflage this, since they only return the portion (albeit being dependent on the \code{minimum} parameter).}
The function \code{portion_df} takes any variable from \code{data} that has an \code{"rsi"} class (created with \code{\link{as.rsi}}) and calculates the portions R, I and S. The resulting \emph{tidy data} (see Source) \code{data.frame} will have three rows (S/I/R) and a column for each group and each variable with class \code{"rsi"}.
@ -105,12 +105,12 @@ not tested not tested - - - -
-------------------------------------------------------------------------
}
Please note that for \code{only_all_tested = TRUE} applies that:
Please note that, in combination therapies, for \code{only_all_tested = TRUE} applies that:
\preformatted{
count_S() + count_I() + count_R() == count_all()
portion_S() + portion_I() + portion_R() == 1
}
and that for \code{only_all_tested = FALSE} applies that:
and that, in combination therapies, for \code{only_all_tested = FALSE} applies that:
\preformatted{
count_S() + count_I() + count_R() >= count_all()
portion_S() + portion_I() + portion_R() >= 1