<!-- Font Awesome icons --><linkrel="stylesheet"href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css"integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk="crossorigin="anonymous">
<p><strong>Note:</strong> values on this page will change with every website update since they are based on randomly created values and the page was written in <ahref="https://rmarkdown.rstudio.com/"class="external-link">R Markdown</a>. However, the methodology remains unchanged. This page was generated on 10 October 2022.</p>
<p>Conducting AMR data analysis unfortunately requires in-depth knowledge from different scientific fields, which makes it hard to do right. At least, it requires:</p>
<ul>
<li>Good questions (always start with those!)</li>
<li>A thorough understanding of (clinical) epidemiology, to understand the clinical and epidemiological relevance and possible bias of results</li>
<li>A thorough understanding of (clinical) microbiology/infectious diseases, to understand which microorganisms are causal to which infections and the implications of pharmaceutical treatment, as well as understanding intrinsic and acquired microbial resistance</li>
<li>Experience with data analysis with microbiological tests and their results, to understand the determination and limitations of MIC values and their interpretations to RSI values</li>
<li>Availability of the biological taxonomy of microorganisms and probably normalisation factors for pharmaceuticals, such as defined daily doses (DDD)</li>
<li>Available (inter-)national guidelines, and profound methods to apply them</li>
</ul>
<p>Of course, we cannot instantly provide you with knowledge and experience. But with this <code>AMR</code> package, we aimed at providing (1) tools to simplify antimicrobial resistance data cleaning, transformation and analysis, (2) methods to easily incorporate international guidelines and (3) scientifically reliable reference data, including the requirements mentioned above.</p>
<p>The <code>AMR</code> package enables standardised and reproducible AMR data analysis, with the application of evidence-based rules, determination of first isolates, translation of various codes for microorganisms and antimicrobial agents, determination of (multi-drug) resistant microorganisms, and calculation of antimicrobial resistance, prevalence and future trends.</p>
<p>For this tutorial, we will create fake demonstration data to work with.</p>
<p>You can skip to <ahref="#cleaning-the-data">Cleaning the data</a> if you already have your own data ready. If you start your analysis, try to make the structure of your data generally look like this:</p>
<h3id="needed-r-packages">Needed R packages<aclass="anchor"aria-label="anchor"href="#needed-r-packages"></a>
</h3>
<p>As with many uses in R, we need some additional packages for AMR data analysis. Our package works closely together with the <ahref="https://www.tidyverse.org"class="external-link">tidyverse packages</a><ahref="https://dplyr.tidyverse.org/"class="external-link"><code>dplyr</code></a> and <ahref="https://ggplot2.tidyverse.org"class="external-link"><code>ggplot2</code></a> by RStudio. The tidyverse tremendously improves the way we conduct data science - it allows for a very natural way of writing syntaxes and creating beautiful plots in R.</p>
<p>We will also use the <code>cleaner</code> package, that can be used for cleaning data and creating frequency tables.</p>
<h2id="creation-of-data">Creation of data<aclass="anchor"aria-label="anchor"href="#creation-of-data"></a>
</h2>
<p>We will create some fake example data to use for analysis. For AMR data analysis, we need at least: a patient ID, name or code of a microorganism, a date and antimicrobial results (an antibiogram). It could also include a specimen type (e.g.to filter on blood or urine), the ward type (e.g.to filter on ICUs).</p>
<p>With additional columns (like a hospital name, the patients gender of even [well-defined] clinical properties) you can do a comparative analysis, as this tutorial will demonstrate too.</p>
<p>The <code>LETTERS</code> object is available in R - it’s a vector with 26 characters: <code>A</code> to <code>Z</code>. The <code>patients</code> object we just created is now a vector of length 260, with values (patient IDs) varying from <code>A1</code> to <code>Z10</code>. Now we we also set the gender of our patients, by putting the ID and the gender in a table:</p>
<codeclass="sourceCode R"><span><spanclass="va">dates</span><spanclass="op"><-</span><spanclass="fu"><ahref="https://rdrr.io/r/base/seq.html"class="external-link">seq</a></span><spanclass="op">(</span><spanclass="fu"><ahref="https://rdrr.io/r/base/as.Date.html"class="external-link">as.Date</a></span><spanclass="op">(</span><spanclass="st">"2010-01-01"</span><spanclass="op">)</span>, <spanclass="fu"><ahref="https://rdrr.io/r/base/as.Date.html"class="external-link">as.Date</a></span><spanclass="op">(</span><spanclass="st">"2018-01-01"</span><spanclass="op">)</span>, by <spanclass="op">=</span><spanclass="st">"day"</span><spanclass="op">)</span></span></code></pre></div>
<p>This <code>dates</code> object now contains all days in our date range.</p>
<p>For this tutorial, we will uses four different microorganisms: <em>Escherichia coli</em>, <em>Staphylococcus aureus</em>, <em>Streptococcus pneumoniae</em>, and <em>Klebsiella pneumoniae</em>:</p>
<p>Using the <code><ahref="https://rdrr.io/r/base/sample.html"class="external-link">sample()</a></code> function, we can randomly select items from all objects we defined earlier. To let our fake data reflect reality a bit, we will also approximately define the probabilities of bacteria and the antibiotic results, using the <code><ahref="../reference/random.html">random_rsi()</a></code> function.</p>
<p>Using the <code><ahref="https://dplyr.tidyverse.org/reference/mutate-joins.html"class="external-link">left_join()</a></code> function from the <code>dplyr</code> package, we can ‘map’ the gender to the patient ID using the <code>patients_table</code> object we created earlier:</p>
<p>The resulting data set contains 20,000 blood culture isolates. With the <code><ahref="https://rdrr.io/r/utils/head.html"class="external-link">head()</a></code> function we can preview the first 6 rows of this data set:</p>
<p>Now, let’s start the cleaning and the analysis!</p>
</div>
</div>
<divclass="section level2">
<h2id="cleaning-the-data">Cleaning the data<aclass="anchor"aria-label="anchor"href="#cleaning-the-data"></a>
</h2>
<p>We also created a package dedicated to data cleaning and checking, called the <code>cleaner</code> package. It <code><ahref="https://rdrr.io/pkg/cleaner/man/freq.html"class="external-link">freq()</a></code> function can be used to create frequency tables.</p>
<p>For example, for the <code>gender</code> variable:</p>
<p>So, we can draw at least two conclusions immediately. From a data scientists perspective, the data looks clean: only values <code>M</code> and <code>F</code>. From a researchers perspective: there are slightly more men. Nothing we didn’t already know.</p>
<p>The data is already quite clean, but we still need to transform some variables. The <code>bacteria</code> column now consists of text, and we want to add more variables based on microbial IDs later on. So, we will transform this column to valid IDs. The <code><ahref="https://dplyr.tidyverse.org/reference/mutate.html"class="external-link">mutate()</a></code> function of the <code>dplyr</code> package makes this really easy:</p>
<p>We also want to transform the antibiotics, because in real life data we don’t know if they are really clean. The <code><ahref="../reference/as.rsi.html">as.rsi()</a></code> function ensures reliability and reproducibility in these kind of variables. The <code><ahref="../reference/as.rsi.html">is.rsi.eligible()</a></code> can check which columns are probably columns with R/SI test results. Using <code><ahref="https://dplyr.tidyverse.org/reference/mutate.html"class="external-link">mutate()</a></code> and <code><ahref="https://dplyr.tidyverse.org/reference/across.html"class="external-link">across()</a></code>, we can apply the transformation to the formal <code><rsi></code> class:</p>
<p>Finally, we will apply <ahref="https://www.eucast.org/expert_rules_and_intrinsic_resistance/"class="external-link">EUCAST rules</a> on our antimicrobial results. In Europe, most medical microbiological laboratories already apply these rules. Our package features their latest insights on intrinsic resistance and exceptional phenotypes. Moreover, the <code><ahref="../reference/eucast_rules.html">eucast_rules()</a></code> function can also apply additional rules, like forcing <helptitle="ATC: J01CA01">ampicillin</help> = R when <helptitle="ATC: J01CR02">amoxicillin/clavulanic acid</help> = R.</p>
<p>Because the amoxicillin (column <code>AMX</code>) and amoxicillin/clavulanic acid (column <code>AMC</code>) in our data were generated randomly, some rows will undoubtedly contain AMX = S and AMC = R, which is technically impossible. The <code><ahref="../reference/eucast_rules.html">eucast_rules()</a></code> fixes this:</p>
<span> genus <spanclass="op">=</span><spanclass="fu"><ahref="../reference/mo_property.html">mo_genus</a></span><spanclass="op">(</span><spanclass="va">bacteria</span><spanclass="op">)</span>,</span>
<span> species <spanclass="op">=</span><spanclass="fu"><ahref="../reference/mo_property.html">mo_species</a></span><spanclass="op">(</span><spanclass="va">bacteria</span><spanclass="op">)</span></span>
<p>We also need to know which isolates we can <em>actually</em> use for analysis.</p>
<p>To conduct an analysis of antimicrobial resistance, you must <ahref="https:/pubmed.ncbi.nlm.nih.gov/17304462/">only include the first isolate of every patient per episode</a> (Hindler <em>et al.</em>, Clin Infect Dis. 2007). 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 weeks (yes, some countries like the Netherlands have these blood drawing policies). The resistance percentage of oxacillin of all isolates would be overestimated, because you included this MRSA more than once. It would clearly be <ahref="https://en.wikipedia.org/wiki/Selection_bias"class="external-link">selection bias</a>.</p>
<p>The Clinical and Laboratory Standards Institute (CLSI) appoints this as follows:</p>
<blockquote>
<p><em>(…) When preparing a cumulative antibiogram to guide clinical decisions about empirical antimicrobial therapy of initial infections, <strong>only the first isolate of a given species per patient, per analysis period (eg, one year) should be included, irrespective of body site, antimicrobial susceptibility profile, or other phenotypical characteristics (eg, biotype)</strong>. The first isolate is easily identified, and cumulative antimicrobial susceptibility test data prepared using the first isolate are generally comparable to cumulative antimicrobial susceptibility test data calculated by other methods, providing duplicate isolates are excluded.</em><br><ahref="https://clsi.org/standards/products/microbiology/documents/m39/"class="external-link">M39-A4 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition. CLSI, 2014. Chapter 6.4</a></p>
</blockquote>
<p>This <code>AMR</code> package includes this methodology with the <code><ahref="../reference/first_isolate.html">first_isolate()</a></code> function and is able to apply the four different methods as defined by <ahref="https://academic.oup.com/cid/article/44/6/867/364325"class="external-link">Hindler <em>et al.</em> in 2007</a>: phenotype-based, episode-based, patient-based, isolate-based. The right method depends on your goals and analysis, but the default phenotype-based method is in any case the method to properly correct for most duplicate isolates. This method also takes into account the antimicrobial susceptibility test results using <code>all_microbials()</code>. Read more about the methods on the <code><ahref="../reference/first_isolate.html">first_isolate()</a></code> page.</p>
<p>The outcome of the function can easily be added to our data:</p>
<p>So only 53.3% is suitable for resistance analysis! We can now filter on it with the <code><ahref="https://dplyr.tidyverse.org/reference/filter.html"class="external-link">filter()</a></code> function, also from the <code>dplyr</code> package:</p>
<h2id="analysing-the-data">Analysing the data<aclass="anchor"aria-label="anchor"href="#analysing-the-data"></a>
</h2>
<p>You might want to start by getting an idea of how the data is distributed. It’s an important start, because it also decides how you will continue your analysis. Although this package contains a convenient function to make frequency tables, exploratory data analysis (EDA) is not the primary scope of this package. Use a package like <ahref="https://cran.r-project.org/package=DataExplorer"class="external-link"><code>DataExplorer</code></a> for that, or read the free online book <ahref="https://bookdown.org/rdpeng/exdata/"class="external-link">Exploratory Data Analysis with R</a> by Roger D. Peng.</p>
<divclass="section level3">
<h3id="dispersion-of-species">Dispersion of species<aclass="anchor"aria-label="anchor"href="#dispersion-of-species"></a>
</h3>
<p>To just get an idea how the species are distributed, create a frequency table with our <code><ahref="https://rdrr.io/pkg/cleaner/man/freq.html"class="external-link">freq()</a></code> function. We created the <code>genus</code> and <code>species</code> column earlier based on the microbial ID. With <code><ahref="https://rdrr.io/r/base/paste.html"class="external-link">paste()</a></code>, we can concatenate them together.</p>
<p>The <code><ahref="https://rdrr.io/pkg/cleaner/man/freq.html"class="external-link">freq()</a></code> function can be used like the base R language was intended:</p>
<h3id="overview-of-different-bugdrug-combinations">Overview of different bug/drug combinations<aclass="anchor"aria-label="anchor"href="#overview-of-different-bugdrug-combinations"></a>
</h3>
<p>Using <ahref="https://tidyselect.r-lib.org/reference/language.html"class="external-link">tidyverse selections</a>, you can also select or filter columns based on the antibiotic class they are in:</p>
<p>If you want to get a quick glance of the number of isolates in different bug/drug combinations, you can use the <code><ahref="../reference/bug_drug_combinations.html">bug_drug_combinations()</a></code> function:</p>
<span><spanclass="fu"><ahref="https://rdrr.io/r/utils/head.html"class="external-link">head</a></span><spanclass="op">(</span><spanclass="op">)</span><spanclass="co"># show first 6 rows</span></span></code></pre></div>
<pre><code><span><spanclass="co"># ℹ Using column 'bacteria' as input for `col_mo`.</span></span></code></pre>
<p>This will only give you the crude numbers in the data. To calculate antimicrobial resistance in a more sensible way, also by correcting for too few results, we use the <code><ahref="../reference/proportion.html">resistance()</a></code> and <code><ahref="../reference/proportion.html">susceptibility()</a></code> functions.</p>
<p>The functions <code><ahref="../reference/proportion.html">resistance()</a></code> and <code><ahref="../reference/proportion.html">susceptibility()</a></code> can be used to calculate antimicrobial resistance or susceptibility. For more specific analyses, the functions <code><ahref="../reference/proportion.html">proportion_S()</a></code>, <code><ahref="../reference/proportion.html">proportion_SI()</a></code>, <code><ahref="../reference/proportion.html">proportion_I()</a></code>, <code><ahref="../reference/proportion.html">proportion_IR()</a></code> and <code><ahref="../reference/proportion.html">proportion_R()</a></code> can be used to determine the proportion of a specific antimicrobial outcome.</p>
<p>All these functions contain a <code>minimum</code> argument, denoting the minimum required number of test results for returning a value. These functions will otherwise return <code>NA</code>. The default is <code>minimum = 30</code>, following the <ahref="https://clsi.org/standards/products/microbiology/documents/m39/"class="external-link">CLSI M39-A4 guideline</a> for applying microbial epidemiology.</p>
<p>As per the EUCAST guideline of 2019, we calculate resistance as the proportion of R (<code><ahref="../reference/proportion.html">proportion_R()</a></code>, equal to <code><ahref="../reference/proportion.html">resistance()</a></code>) and susceptibility as the proportion of S and I (<code><ahref="../reference/proportion.html">proportion_SI()</a></code>, equal to <code><ahref="../reference/proportion.html">susceptibility()</a></code>). These functions can be used on their own:</p>
<p>Or can be used in conjunction with <code><ahref="https://dplyr.tidyverse.org/reference/group_by.html"class="external-link">group_by()</a></code> and <code><ahref="https://dplyr.tidyverse.org/reference/summarise.html"class="external-link">summarise()</a></code>, both from the <code>dplyr</code> package:</p>
<p>Of course it would be very convenient to know the number of isolates responsible for the percentages. For that purpose the <code><ahref="../reference/count.html">n_rsi()</a></code> can be used, which works exactly like <code><ahref="https://dplyr.tidyverse.org/reference/n_distinct.html"class="external-link">n_distinct()</a></code> from the <code>dplyr</code> package. It counts all isolates available for every group (i.e.values S, I or R):</p>
<span> available <spanclass="op">=</span><spanclass="fu"><ahref="../reference/count.html">n_rsi</a></span><spanclass="op">(</span><spanclass="va">AMX</span><spanclass="op">)</span></span>
<p>These functions can also be used to get the proportion of multiple antibiotics, to calculate empiric susceptibility of combination therapies very easily:</p>
<p>Or if you are curious for the resistance within certain antibiotic classes, use a antibiotic class selector such as <code><ahref="../reference/antibiotic_class_selectors.html">penicillins()</a></code>, which automatically will include the columns <code>AMX</code> and <code>AMC</code> of our data:</p>
<p>To show results in plots, most R users would nowadays use the <code>ggplot2</code> package. This package lets you create plots in layers. You can read more about it <ahref="https://ggplot2.tidyverse.org/"class="external-link">on their website</a>. A quick example would look like these syntaxes:</p>
<p>The <code>AMR</code> package contains functions to extend this <code>ggplot2</code> package, for example <code><ahref="../reference/ggplot_rsi.html">geom_rsi()</a></code>. It automatically transforms data with <code><ahref="../reference/count.html">count_df()</a></code> or <code><ahref="../reference/proportion.html">proportion_df()</a></code> and show results in stacked bars. Its simplest and shortest example:</p>
<p>Omit the <code>translate_ab = FALSE</code> to have the antibiotic codes (AMX, AMC, CIP, GEN) translated to official WHO names (amoxicillin, amoxicillin/clavulanic acid, ciprofloxacin, gentamicin).</p>
<p>If we group on e.g.the <code>genus</code> column and add some additional functions from our package, we can create this:</p>
<p>To simplify this, we also created the <code><ahref="../reference/ggplot_rsi.html">ggplot_rsi()</a></code> function, which combines almost all above functions:</p>
<h4id="plotting-mic-and-disk-diffusion-values">Plotting MIC and disk diffusion values<aclass="anchor"aria-label="anchor"href="#plotting-mic-and-disk-diffusion-values"></a>
</h4>
<p>The AMR package also extends the <code><ahref="../reference/plot.html">plot()</a></code> and <code><ahref="https://ggplot2.tidyverse.org/reference/autoplot.html"class="external-link">ggplot2::autoplot()</a></code> functions for plotting minimum inhibitory concentrations (MIC, created with <code><ahref="../reference/as.mic.html">as.mic()</a></code>) and disk diffusion diameters (created with <code><ahref="../reference/as.disk.html">as.disk()</a></code>).</p>
<p>With the <code><ahref="../reference/random.html">random_mic()</a></code> and <code><ahref="../reference/random.html">random_disk()</a></code> functions, we can generate sampled values for the new data types (S3 classes) <code><mic></code> and <code><disk></code>:</p>
<codeclass="sourceCode R"><span><spanclass="va">mic_values</span><spanclass="op"><-</span><spanclass="fu"><ahref="../reference/random.html">random_mic</a></span><spanclass="op">(</span>size <spanclass="op">=</span><spanclass="fl">100</span>, mo <spanclass="op">=</span><spanclass="st">"E. coli"</span>, ab <spanclass="op">=</span><spanclass="st">"cipro"</span><spanclass="op">)</span></span></code></pre></div>
<p>For the <code><ahref="../reference/plot.html">plot()</a></code> and <code><ahref="https://ggplot2.tidyverse.org/reference/autoplot.html"class="external-link">autoplot()</a></code> function, we can define the microorganism and an antimicrobial agent the same way. This will add the interpretation of those values according to a chosen guidelines (defaults to the latest EUCAST guideline).</p>
<p>Default colours are colour-blind friendly, while maintaining the convention that e.g.‘susceptible’ should be green and ‘resistant’ should be red:</p>
<codeclass="sourceCode R"><span><spanclass="co"># base R:</span></span>
<span><spanclass="fu"><ahref="../reference/plot.html">plot</a></span><spanclass="op">(</span><spanclass="va">mic_values</span>, mo <spanclass="op">=</span><spanclass="st">"E. coli"</span>, ab <spanclass="op">=</span><spanclass="st">"cipro"</span><spanclass="op">)</span></span></code></pre></div>
<span><spanclass="fu"><ahref="https://ggplot2.tidyverse.org/reference/autoplot.html"class="external-link">autoplot</a></span><spanclass="op">(</span><spanclass="va">mic_values</span>, mo <spanclass="op">=</span><spanclass="st">"E. coli"</span>, ab <spanclass="op">=</span><spanclass="st">"cipro"</span><spanclass="op">)</span></span></code></pre></div>
<codeclass="sourceCode R"><span><spanclass="va">disk_values</span><spanclass="op"><-</span><spanclass="fu"><ahref="../reference/random.html">random_disk</a></span><spanclass="op">(</span>size <spanclass="op">=</span><spanclass="fl">100</span>, mo <spanclass="op">=</span><spanclass="st">"E. coli"</span>, ab <spanclass="op">=</span><spanclass="st">"cipro"</span><spanclass="op">)</span></span>
<span><spanclass="va">disk_values</span></span>
<span><spanclass="co"># Class <disk></span></span>
<codeclass="sourceCode R"><span><spanclass="co"># base R:</span></span>
<span><spanclass="fu"><ahref="../reference/plot.html">plot</a></span><spanclass="op">(</span><spanclass="va">disk_values</span>, mo <spanclass="op">=</span><spanclass="st">"E. coli"</span>, ab <spanclass="op">=</span><spanclass="st">"cipro"</span><spanclass="op">)</span></span></code></pre></div>
<p>And when using the <code>ggplot2</code> package, but now choosing the latest implemented CLSI guideline (notice that the EUCAST-specific term “Susceptible, incr. exp.” has changed to “Intermediate”):</p>
<p>The next example uses the <code>example_isolates</code> data set. This is a data set included with this package and contains 2,000 microbial isolates with their full antibiograms. It reflects reality and can be used to practise AMR data analysis.</p>
<p>We will compare the resistance to amoxicillin/clavulanic acid (column <code>FOS</code>) between an ICU and other clinical wards. The input for the <code><ahref="https://rdrr.io/r/stats/fisher.test.html"class="external-link">fisher.test()</a></code> can be retrieved with a transformation like this:</p>
<span><spanclass="fu"><ahref="https://dplyr.tidyverse.org/reference/filter.html"class="external-link">filter</a></span><spanclass="op">(</span><spanclass="va">ward</span><spanclass="op"><ahref="https://rdrr.io/r/base/match.html"class="external-link">%in%</a></span><spanclass="fu"><ahref="https://rdrr.io/r/base/c.html"class="external-link">c</a></span><spanclass="op">(</span><spanclass="st">"ICU"</span>, <spanclass="st">"Clinical"</span><spanclass="op">)</span><spanclass="op">)</span><spanclass="op"><ahref="https://magrittr.tidyverse.org/reference/pipe.html"class="external-link">%>%</a></span><spanclass="co"># filter on only these wards</span></span>
<span><spanclass="fu"><ahref="https://dplyr.tidyverse.org/reference/select.html"class="external-link">select</a></span><spanclass="op">(</span><spanclass="va">ward</span>, <spanclass="va">AMC</span><spanclass="op">)</span><spanclass="op"><ahref="https://magrittr.tidyverse.org/reference/pipe.html"class="external-link">%>%</a></span><spanclass="co"># select the wards and amoxi/clav</span></span>
<span><spanclass="fu"><ahref="https://dplyr.tidyverse.org/reference/group_by.html"class="external-link">group_by</a></span><spanclass="op">(</span><spanclass="va">ward</span><spanclass="op">)</span><spanclass="op"><ahref="https://magrittr.tidyverse.org/reference/pipe.html"class="external-link">%>%</a></span><spanclass="co"># group on the wards</span></span>
<span><spanclass="fu"><ahref="../reference/count.html">count_df</a></span><spanclass="op">(</span>combine_SI <spanclass="op">=</span><spanclass="cn">TRUE</span><spanclass="op">)</span><spanclass="op"><ahref="https://magrittr.tidyverse.org/reference/pipe.html"class="external-link">%>%</a></span><spanclass="co"># count all isolates per group (ward)</span></span>
<span> names_from <spanclass="op">=</span><spanclass="va">ward</span>, <spanclass="co"># transform output so "ICU" and "Clinical" are columns</span></span>
<span><spanclass="fu"><ahref="https://dplyr.tidyverse.org/reference/select.html"class="external-link">select</a></span><spanclass="op">(</span><spanclass="va">ICU</span>, <spanclass="va">Clinical</span><spanclass="op">)</span><spanclass="op"><ahref="https://magrittr.tidyverse.org/reference/pipe.html"class="external-link">%>%</a></span><spanclass="co"># and only select these columns</span></span>
<span><spanclass="fu"><ahref="https://rdrr.io/r/base/matrix.html"class="external-link">as.matrix</a></span><spanclass="op">(</span><spanclass="op">)</span><spanclass="co"># transform to a good old matrix for fisher.test()</span></span>
<p>As can be seen, the p value is practically zero (0.0000002263247), which means that the amoxicillin/clavulanic acid resistance found in isolates between patients in ICUs and other clinical wards are really different.</p>
</main><asideclass="col-md-3"><navid="toc"><h2>On this page</h2>
</nav></aside>
</div>
<footer><divclass="pkgdown-footer-left">
<p></p>
<p><code>AMR</code> (for R). Developed at the <atarget="_blank"href="https://www.rug.nl"class="external-link">University of Groningen</a> in collaboration with non-profit organisations<br><atarget="_blank"href="https://www.certe.nl"class="external-link">Certe Medical Diagnostics and Advice Foundation</a> and <atarget="_blank"href="https://www.umcg.nl"class="external-link">University Medical Center Groningen</a>.</p>