portion_df()
and count_df()
this means that their new parameter combine_SI
is TRUE at default. Our plotting function ggplot_rsi()
also reflects this change since it uses count_df()
internally.age()
function gained a new parameter exact
to determine ages with decimalsguess_mo()
, guess_atc()
, EUCAST_rules()
, interpretive_reading()
, rsi()
+guess_mo()
, guess_atc()
, EUCAST_rules()
, interpretive_reading()
, rsi()
freq()
):
as.mo(..., allow_uncertain = 3)
Contents
For suggestions, comments or questions, please contact us at:
Matthijs S. Berends
-m.s.berends at umcg dot nl
+m.s.berends at umcg dot nl
Department of Medical Microbiology, University of Groningen
University Medical Center Groningen
Post Office Box 30001
diff --git a/docs/reference/as.mic.html b/docs/reference/as.mic.html
index fc94688b..be281cc5 100644
--- a/docs/reference/as.mic.html
+++ b/docs/reference/as.mic.html
@@ -85,7 +85,7 @@
vector of values (for class mic
: an MIC value in mg/L, for class disk
: a disk diffusion radius in millimeters)
vector of values (for class mic
: an MIC value in mg/L, for class disk
: a disk diffusion radius in millimeters)
WHY THIS IS SO IMPORTANT
-To conduct an analysis of antimicrobial resistance, you should only include the first isolate of every patient per episode [1](https://www.ncbi.nlm.nih.gov/pubmed/17304462). If you would not do this, you could easily get an overestimate or underestimate of the resistance of an antibiotic. Imagine that a patient was admitted with an MRSA and that it was found in 5 different blood cultures the following week. The resistance percentage of oxacillin of all S. aureus isolates would be overestimated, because you included this MRSA more than once. It would be selection bias.
All isolates with a microbial ID of NA
will be excluded as first isolate.
The functions filter_first_isolate()
and filter_first_weighted_isolate()
are helper functions to quickly filter on first isolates. The function filter_first_isolate()
is essentially equal to:
x %>% mutate(only_firsts = first_isolate(x, ...)) %>% diff --git a/docs/reference/g.test.html b/docs/reference/g.test.html index 05903459..662a0ebb 100644 --- a/docs/reference/g.test.html +++ b/docs/reference/g.test.html @@ -51,7 +51,7 @@ - + @@ -85,7 +85,7 @@@@ -234,7 +234,7 @@-+
g.test()
performs chi-squared contingency table tests and goodness-of-fit tests, just likechisq.test()
but is more reliable 1. A G-test can be used to see whether the number of observations in each category fits a theoretical expectation (called a G-test of goodness-of-fit), or to see whether the proportions of one variable are different for different values of the other variable (called a G-test of independence).
g.test()
performs chi-squared contingency table tests and goodness-of-fit tests, just likechisq.test()
but is more reliable (1). A G-test can be used to see whether the number of observations in each category fits a theoretical expectation (called a G-test of goodness-of-fit), or to see whether the proportions of one variable are different for different values of the other variable (called a G-test of independence).g.test(x, y = NULL, p = rep(1/length(x), length(x)), rescale.p = FALSE)@@ -334,7 +334,11 @@On our website https://msberends.gitlab.io/AMR you can find a tutorial about how to conduct AMR analysis, the complete documentation of all functions (which reads a lot easier than here in R) and an example analysis using WHONET data.
References
-1 McDonald, J.H. 2014. Handbook of Biological Statistics (3rd ed.). Sparky House Publishing, Baltimore, Maryland. http://www.biostathandbook.com/gtestgof.html.
+ ++
+- +
McDonald, J.H. 2014. Handbook of Biological Statistics (3rd ed.). Sparky House Publishing, Baltimore, Maryland. http://www.biostathandbook.com/gtestgof.html.
See also
diff --git a/docs/reference/index.html b/docs/reference/index.html index 5de7a7bb..e1f0eda9 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -84,7 +84,7 @@ diff --git a/docs/reference/join.html b/docs/reference/join.html index ac2c22d1..83c9c22f 100644 --- a/docs/reference/join.html +++ b/docs/reference/join.html @@ -85,7 +85,7 @@ @@ -272,7 +272,7 @@Details
-Note: As opposed to the
+dplyr::join()
functions ofdplyr
,characters
vectors are supported and at default existing columns will get a suffix"2"
and the newly joined columns will not get a suffix. Seedplyr::join()
for more information.Note: As opposed to the
dplyr::join()
functions ofdplyr
,character
vectors are supported and at default existing columns will get a suffix"2"
and the newly joined columns will not get a suffix. Seedplyr::join()
for more information.Read more on our website!
diff --git a/docs/reference/kurtosis.html b/docs/reference/kurtosis.html index 68b766cc..fbfe601e 100644 --- a/docs/reference/kurtosis.html +++ b/docs/reference/kurtosis.html @@ -85,7 +85,7 @@ @@ -253,7 +253,7 @@x -+ a vector of values, a
matrix
or adata frame
a vector of values, a
matrix
or adata.frame
na.rm diff --git a/docs/reference/mdro.html b/docs/reference/mdro.html index a3696044..dbb427b3 100644 --- a/docs/reference/mdro.html +++ b/docs/reference/mdro.html @@ -85,7 +85,7 @@ @@ -325,7 +325,7 @@ The international guideline for multi-drug resistant tuberculosis - World Health
guideline = "MRGN"
The German national guideline - Mueller et al. (2015) Antimicrobial Resistance and Infection Control 4:7. DOI: 10.1186/s13756-015-0047-6+The Dutch national guideline - Rijksinstituut voor Volksgezondheid en Milieu "WIP-richtlijn BRMO (Bijzonder Resistente Micro-Organismen) (ZKH)" (link)
guideline = "BRMO"
-The Dutch national guideline - Rijksinstituut voor Volksgezondheid en Milieu "WIP-richtlijn BRMO (Bijzonder Resistente Micro-Organismen) ZKH" (link)Please suggest your own (country-specific) guidelines by letting us know: https://gitlab.com/msberends/AMR/issues/new.
diff --git a/docs/reference/microorganisms.html b/docs/reference/microorganisms.html index 64d5dc0f..cf38ddd2 100644 --- a/docs/reference/microorganisms.html +++ b/docs/reference/microorganisms.html @@ -85,7 +85,7 @@ @@ -261,7 +261,7 @@Manually added were:
- -
11 entries of Streptococcus (beta-haemolytic: groups A, B, C, D, F, G, H, K and unspecified; other: viridans, milleri)
- +
2 entries of Staphylococcus (coagulase-negative CoNS and coagulase-positive CoPS)
2 entries of Staphylococcus (coagulase-negative (CoNS) and coagulase-positive (CoPS))
3 entries of Trichomonas (Trichomonas vaginalis, and its family and genus)
1 entry of Blastocystis (Blastocystis hominis), although it officially does not exist (Noel et al. 2005, PMID 15634993)
- diff --git a/man/AMR.Rd b/man/AMR.Rd index 18b6ef1a..1b89d985 100644 --- a/man/AMR.Rd +++ b/man/AMR.Rd @@ -36,7 +36,7 @@ On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https:// For suggestions, comments or questions, please contact us at: Matthijs S. Berends \cr -m.s.berends \link{at} umcg \link{dot} nl \cr +m.s.berends at umcg dot nl \cr Department of Medical Microbiology, University of Groningen \cr University Medical Center Groningen \cr Post Office Box 30001 \cr diff --git a/man/as.mic.Rd b/man/as.mic.Rd index 330574c0..4cee1a6e 100755 --- a/man/as.mic.Rd +++ b/man/as.mic.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/mic.R \name{as.mic} \alias{as.mic} -\alias{MIC} +\alias{mic} \alias{is.mic} \title{Class 'mic'} \usage{ diff --git a/man/as.rsi.Rd b/man/as.rsi.Rd index 85f30563..9450be42 100755 --- a/man/as.rsi.Rd +++ b/man/as.rsi.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/rsi.R \name{as.rsi} \alias{as.rsi} -\alias{RSI} +\alias{rsi} \alias{as.rsi.mic} \alias{as.rsi.disk} \alias{as.rsi.data.frame} diff --git a/man/first_isolate.Rd b/man/first_isolate.Rd index 013e1cc5..cc2a7ebe 100755 --- a/man/first_isolate.Rd +++ b/man/first_isolate.Rd @@ -94,7 +94,7 @@ Determine first (weighted) isolates of all microorganisms of every patient per e } \details{ \strong{WHY THIS IS SO IMPORTANT} \cr -To conduct an analysis of antimicrobial resistance, you should only include the first isolate of every patient per episode [\link{1}](https://www.ncbi.nlm.nih.gov/pubmed/17304462). If you would not do this, you could easily get an overestimate or underestimate of the resistance of an antibiotic. Imagine that a patient was admitted with an MRSA and that it was found in 5 different blood cultures the following week. The resistance percentage of oxacillin of all \emph{S. aureus} isolates would be overestimated, because you included this MRSA more than once. It would be \href{https://en.wikipedia.org/wiki/Selection_bias}{selection bias}. +To conduct an analysis of antimicrobial resistance, you should only include the first isolate of every patient per episode \href{https://www.ncbi.nlm.nih.gov/pubmed/17304462}{(ref)}. If you would not do this, you could easily get an overestimate or underestimate of the resistance of an antibiotic. Imagine that a patient was admitted with an MRSA and that it was found in 5 different blood cultures the following week. The resistance percentage of oxacillin of all \emph{S. aureus} isolates would be overestimated, because you included this MRSA more than once. It would be \href{https://en.wikipedia.org/wiki/Selection_bias}{selection bias}. All isolates with a microbial ID of \code{NA} will be excluded as first isolate. diff --git a/man/g.test.Rd b/man/g.test.Rd index fee57e8d..fbcda011 100644 --- a/man/g.test.Rd +++ b/man/g.test.Rd @@ -49,7 +49,7 @@ A list with class \code{"htest"} containing the following section 2.4.5 for the case where \code{x} is a matrix, \code{n * p * (1 - p)} otherwise).} } \description{ -\code{\link[=g.test]{g.test()}} performs chi-squared contingency table tests and goodness-of-fit tests, just like \code{\link[=chisq.test]{chisq.test()}} but is more reliable \link{1}. A \emph{G}-test can be used to see whether the number of observations in each category fits a theoretical expectation (called a \strong{\emph{G}-test of goodness-of-fit}), or to see whether the proportions of one variable are different for different values of the other variable (called a \strong{\emph{G}-test of independence}). +\code{\link[=g.test]{g.test()}} performs chi-squared contingency table tests and goodness-of-fit tests, just like \code{\link[=chisq.test]{chisq.test()}} but is more reliable (1). A \emph{G}-test can be used to see whether the number of observations in each category fits a theoretical expectation (called a \strong{\emph{G}-test of goodness-of-fit}), or to see whether the proportions of one variable are different for different values of the other variable (called a \strong{\emph{G}-test of independence}). } \details{ If \code{x} is a matrix with one row or column, or if \code{x} is a vector and \code{y} is not given, then a \emph{goodness-of-fit test} is performed (\code{x} is treated as a one-dimensional contingency table). The entries of \code{x} must be non-negative integers. In this case, the hypothesis tested is whether the population probabilities equal those in \code{p}, or are all equal if \code{p} is not given. @@ -137,7 +137,9 @@ g.test(x) } \references{ -\link{1} McDonald, J.H. 2014. \strong{Handbook of Biological Statistics (3rd ed.)}. Sparky House Publishing, Baltimore, Maryland. \url{http://www.biostathandbook.com/gtestgof.html}. +\enumerate{ +\item McDonald, J.H. 2014. \strong{Handbook of Biological Statistics (3rd ed.)}. Sparky House Publishing, Baltimore, Maryland. \url{http://www.biostathandbook.com/gtestgof.html}. +} } \seealso{ \code{\link[=chisq.test]{chisq.test()}} diff --git a/man/join.Rd b/man/join.Rd index 53aaac64..50f517b8 100755 --- a/man/join.Rd +++ b/man/join.Rd @@ -36,7 +36,7 @@ anti_join_microorganisms(x, by = NULL, ...) Join the data set \link{microorganisms} easily to an existing table or character vector. } \details{ -\strong{Note:} As opposed to the \code{\link[dplyr:join]{dplyr::join()}} functions of \code{dplyr}, \code{\link{characters}} vectors are supported and at default existing columns will get a suffix \code{"2"} and the newly joined columns will not get a suffix. See \code{\link[dplyr:join]{dplyr::join()}} for more information. +\strong{Note:} As opposed to the \code{\link[dplyr:join]{dplyr::join()}} functions of \code{dplyr}, \code{\link{character}} vectors are supported and at default existing columns will get a suffix \code{"2"} and the newly joined columns will not get a suffix. See \code{\link[dplyr:join]{dplyr::join()}} for more information. } \section{Read more on our website!}{ diff --git a/man/kurtosis.Rd b/man/kurtosis.Rd index 59b08786..b3d0d9d0 100644 --- a/man/kurtosis.Rd +++ b/man/kurtosis.Rd @@ -16,7 +16,7 @@ kurtosis(x, na.rm = FALSE) \method{kurtosis}{data.frame}(x, na.rm = FALSE) } \arguments{ -\item{x}{a vector of values, a \code{\link{matrix}} or a \code{\link{data frame}}} +\item{x}{a vector of values, a \code{\link{matrix}} or a \code{\link{data.frame}}} \item{na.rm}{a logical value indicating whether \code{NA} values should be stripped before the computation proceeds.} } diff --git a/man/mdro.Rd b/man/mdro.Rd index 0a824c01..29a6499c 100644 --- a/man/mdro.Rd +++ b/man/mdro.Rd @@ -85,7 +85,7 @@ The international guideline for multi-drug resistant tuberculosis - World Health \item \code{guideline = "MRGN"}\cr The German national guideline - Mueller et al. (2015) Antimicrobial Resistance and Infection Control 4:7. DOI: 10.1186/s13756-015-0047-6 \item \code{guideline = "BRMO"}\cr -The Dutch national guideline - Rijksinstituut voor Volksgezondheid en Milieu "WIP-richtlijn BRMO (Bijzonder Resistente Micro-Organismen) \link{ZKH}" (\href{https://www.rivm.nl/Documenten_en_publicaties/Professioneel_Praktisch/Richtlijnen/Infectieziekten/WIP_Richtlijnen/WIP_Richtlijnen/Ziekenhuizen/WIP_richtlijn_BRMO_Bijzonder_Resistente_Micro_Organismen_ZKH}{link}) +The Dutch national guideline - Rijksinstituut voor Volksgezondheid en Milieu "WIP-richtlijn BRMO (Bijzonder Resistente Micro-Organismen) (ZKH)" (\href{https://www.rivm.nl/Documenten_en_publicaties/Professioneel_Praktisch/Richtlijnen/Infectieziekten/WIP_Richtlijnen/WIP_Richtlijnen/Ziekenhuizen/WIP_richtlijn_BRMO_Bijzonder_Resistente_Micro_Organismen_ZKH}{link}) } Please suggest your own (country-specific) guidelines by letting us know: \url{https://gitlab.com/msberends/AMR/issues/new}. diff --git a/man/microorganisms.Rd b/man/microorganisms.Rd index 34c0dc79..946696d6 100755 --- a/man/microorganisms.Rd +++ b/man/microorganisms.Rd @@ -31,7 +31,7 @@ A data set containing the microbial taxonomy of six kingdoms from the Catalogue Manually added were: \itemize{ \item 11 entries of \emph{Streptococcus} (beta-haemolytic: groups A, B, C, D, F, G, H, K and unspecified; other: viridans, milleri) -\item 2 entries of \emph{Staphylococcus} (coagulase-negative \link{CoNS} and coagulase-positive \link{CoPS}) +\item 2 entries of \emph{Staphylococcus} (coagulase-negative (CoNS) and coagulase-positive (CoPS)) \item 3 entries of \emph{Trichomonas} (\emph{Trichomonas vaginalis}, and its family and genus) \item 1 entry of \emph{Blastocystis} (\emph{Blastocystis hominis}), although it officially does not exist (Noel \emph{et al.} 2005, PMID 15634993) \item 5 other 'undefined' entries (unknown, unknown Gram negatives, unknown Gram positives, unknown yeast and unknown fungus) diff --git a/tests/testthat/test-mo_property.R b/tests/testthat/test-mo_property.R index 93b4f3e2..7477d741 100644 --- a/tests/testthat/test-mo_property.R +++ b/tests/testthat/test-mo_property.R @@ -45,7 +45,7 @@ test_that("mo_property works", { expect_equal(class(mo_synonyms(c("Candida albicans", "Escherichia coli"))), "list") expect_equal(names(mo_info("Escherichia coli")), c("kingdom", "phylum", "class", "order", "family", "genus", "species", "subspecies", - "synonyms", "url", "ref")) + "synonyms", "gramstain", "url", "ref")) expect_equal(class(mo_info(c("Escherichia coli", "Staphylococcus aureus"))), "list") expect_equal(mo_ref("Escherichia coli"), "Castellani et al., 1919")
5 other 'undefined' entries (unknown, unknown Gram negatives, unknown Gram positives, unknown yeast and unknown fungus)