mirror of https://github.com/msberends/AMR.git
1607 lines
103 KiB
HTML
1607 lines
103 KiB
HTML
<!-- Generated by pkgdown: do not edit by hand -->
|
||
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
||
<title>Antibiotic Class Selectors — antibiotic_class_selectors • AMR (for R)</title>
|
||
|
||
<!-- favicons -->
|
||
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
|
||
<link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png">
|
||
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png" />
|
||
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
|
||
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
|
||
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
|
||
|
||
<!-- jquery -->
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
|
||
<!-- Bootstrap -->
|
||
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous" />
|
||
|
||
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
|
||
|
||
<!-- bootstrap-toc -->
|
||
<link rel="stylesheet" href="../bootstrap-toc.css">
|
||
<script src="../bootstrap-toc.js"></script>
|
||
|
||
<!-- Font Awesome icons -->
|
||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
|
||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
|
||
|
||
<!-- clipboard.js -->
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
|
||
|
||
<!-- headroom.js -->
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
|
||
|
||
<!-- pkgdown -->
|
||
<link href="../pkgdown.css" rel="stylesheet">
|
||
<script src="../pkgdown.js"></script>
|
||
|
||
|
||
|
||
<link href="../extra.css" rel="stylesheet">
|
||
<script src="../extra.js"></script>
|
||
|
||
<meta property="og:title" content="Antibiotic Class Selectors — antibiotic_class_selectors" />
|
||
<meta property="og:description" content="These functions help to filter and select columns with antibiotic test results that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations.
|
||
" />
|
||
<meta property="og:image" content="https://msberends.github.io/AMR/logo.png" />
|
||
|
||
|
||
|
||
|
||
<!-- mathjax -->
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
|
||
|
||
<!--[if lt IE 9]>
|
||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||
<![endif]-->
|
||
|
||
|
||
|
||
</head>
|
||
|
||
<body data-spy="scroll" data-target="#toc">
|
||
<div class="container template-reference-topic">
|
||
<header>
|
||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||
<div class="container">
|
||
<div class="navbar-header">
|
||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
|
||
<span class="sr-only">Toggle navigation</span>
|
||
<span class="icon-bar"></span>
|
||
<span class="icon-bar"></span>
|
||
<span class="icon-bar"></span>
|
||
</button>
|
||
<span class="navbar-brand">
|
||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.7.1</span>
|
||
</span>
|
||
</div>
|
||
|
||
<div id="navbar" class="navbar-collapse collapse">
|
||
<ul class="nav navbar-nav">
|
||
<li>
|
||
<a href="../index.html">
|
||
<span class="fas fa-home"></span>
|
||
|
||
Home
|
||
</a>
|
||
</li>
|
||
<li class="dropdown">
|
||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||
<span class="fas fa-question-circle"></span>
|
||
|
||
How to
|
||
|
||
<span class="caret"></span>
|
||
</a>
|
||
<ul class="dropdown-menu" role="menu">
|
||
<li>
|
||
<a href="../articles/AMR.html">
|
||
<span class="fas fa-directions"></span>
|
||
|
||
Conduct AMR analysis
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="../articles/resistance_predict.html">
|
||
<span class="fas fa-dice"></span>
|
||
|
||
Predict antimicrobial resistance
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="../articles/datasets.html">
|
||
<span class="fas fa-database"></span>
|
||
|
||
Data sets for download / own use
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="../articles/PCA.html">
|
||
<span class="fas fa-compress"></span>
|
||
|
||
Conduct principal component analysis for AMR
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="../articles/MDR.html">
|
||
<span class="fas fa-skull-crossbones"></span>
|
||
|
||
Determine multi-drug resistance (MDR)
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="../articles/WHONET.html">
|
||
<span class="fas fa-globe-americas"></span>
|
||
|
||
Work with WHONET data
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="../articles/SPSS.html">
|
||
<span class="fas fa-file-upload"></span>
|
||
|
||
Import data from SPSS/SAS/Stata
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="../articles/EUCAST.html">
|
||
<span class="fas fa-exchange-alt"></span>
|
||
|
||
Apply EUCAST rules
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="../reference/mo_property.html">
|
||
<span class="fas fa-bug"></span>
|
||
|
||
Get properties of a microorganism
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="../reference/ab_property.html">
|
||
<span class="fas fa-capsules"></span>
|
||
|
||
Get properties of an antibiotic
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="../articles/benchmarks.html">
|
||
<span class="fas fa-shipping-fast"></span>
|
||
|
||
Other: benchmarks
|
||
</a>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li>
|
||
<a href="../reference/index.html">
|
||
<span class="fas fa-book-open"></span>
|
||
|
||
Manual
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="../authors.html">
|
||
<span class="fas fa-users"></span>
|
||
|
||
Authors
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="../news/index.html">
|
||
<span class="far fa-newspaper"></span>
|
||
|
||
Changelog
|
||
</a>
|
||
</li>
|
||
</ul>
|
||
<ul class="nav navbar-nav navbar-right">
|
||
<li>
|
||
<a href="https://github.com/msberends/AMR">
|
||
<span class="fab fa-github"></span>
|
||
|
||
Source Code
|
||
</a>
|
||
</li>
|
||
<li>
|
||
<a href="../survey.html">
|
||
<span class="fas fa-clipboard-list"></span>
|
||
|
||
Survey
|
||
</a>
|
||
</li>
|
||
</ul>
|
||
|
||
</div><!--/.nav-collapse -->
|
||
</div><!--/.container -->
|
||
</div><!--/.navbar -->
|
||
|
||
|
||
|
||
</header>
|
||
|
||
<div class="row">
|
||
<div class="col-md-9 contents">
|
||
<div class="page-header">
|
||
<h1>Antibiotic Class Selectors</h1>
|
||
<small class="dont-index">Source: <a href='https://github.com/msberends/AMR/blob/master/R/ab_class_selectors.R'><code>R/ab_class_selectors.R</code></a></small>
|
||
<div class="hidden name"><code>antibiotic_class_selectors.Rd</code></div>
|
||
</div>
|
||
|
||
<div class="ref-description">
|
||
<p>These functions help to filter and select columns with antibiotic test results that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations. <strong>
|
||
</strong></p>
|
||
</div>
|
||
|
||
<pre class="usage"><span class='fu'>ab_class</span><span class='op'>(</span><span class='va'>ab_class</span>, only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
|
||
|
||
<span class='fu'>aminoglycosides</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
|
||
|
||
<span class='fu'>betalactams</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
|
||
|
||
<span class='fu'>carbapenems</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
|
||
|
||
<span class='fu'>cephalosporins</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
|
||
|
||
<span class='fu'>cephalosporins_1st</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
|
||
|
||
<span class='fu'>cephalosporins_2nd</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
|
||
|
||
<span class='fu'>cephalosporins_3rd</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
|
||
|
||
<span class='fu'>cephalosporins_4th</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
|
||
|
||
<span class='fu'>cephalosporins_5th</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
|
||
|
||
<span class='fu'>fluoroquinolones</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
|
||
|
||
<span class='fu'>glycopeptides</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
|
||
|
||
<span class='fu'>macrolides</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
|
||
|
||
<span class='fu'>oxazolidinones</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
|
||
|
||
<span class='fu'>penicillins</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
|
||
|
||
<span class='fu'>tetracyclines</span><span class='op'>(</span>only_rsi_columns <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span></pre>
|
||
|
||
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
|
||
<table class="ref-arguments">
|
||
<colgroup><col class="name" /><col class="desc" /></colgroup>
|
||
<tr>
|
||
<th>ab_class</th>
|
||
<td><p>an antimicrobial class, such as <code>"carbapenems"</code>. The columns <code>group</code>, <code>atc_group1</code> and <code>atc_group2</code> of the <a href='antibiotics.html'>antibiotics</a> data set will be searched (case-insensitive) for this value.</p></td>
|
||
</tr>
|
||
<tr>
|
||
<th>only_rsi_columns</th>
|
||
<td><p>a <a href='https://rdrr.io/r/base/logical.html'>logical</a> to indicate whether only columns of class <code><rsi></code> must be selected (defaults to <code>FALSE</code>), see <code><a href='as.rsi.html'>as.rsi()</a></code></p></td>
|
||
</tr>
|
||
</table>
|
||
|
||
<h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
|
||
|
||
<p><strong>
|
||
</strong></p>
|
||
<p>These functions can be used in data set calls for selecting columns and filtering rows, see <em>Examples</em>. They support base R, but work more convenient in dplyr functions such as <code><a href='https://dplyr.tidyverse.org/reference/select.html'>select()</a></code>, <code><a href='https://dplyr.tidyverse.org/reference/filter.html'>filter()</a></code> and <code><a href='https://dplyr.tidyverse.org/reference/summarise.html'>summarise()</a></code>.</p>
|
||
<p>All columns in the data in which these functions are called will be searched for known antibiotic names, abbreviations, brand names, and codes (ATC, EARS-Net, WHO, etc.) in the <a href='antibiotics.html'>antibiotics</a> data set. This means that a selector like e.g. <code>aminoglycosides()</code> will pick up column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc.</p>
|
||
<p>The group of betalactams consists of all carbapenems, cephalosporins and penicillins.</p>
|
||
<h2 class="hasAnchor" id="stable-lifecycle"><a class="anchor" href="#stable-lifecycle"></a>Stable Lifecycle</h2>
|
||
|
||
|
||
|
||
<p><img src='figures/lifecycle_stable.svg' style=margin-bottom:5px /> <br />
|
||
The <a href='lifecycle.html'>lifecycle</a> of this function is <strong>stable</strong>. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.</p>
|
||
<p>If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.</p>
|
||
<h2 class="hasAnchor" id="reference-data-publicly-available"><a class="anchor" href="#reference-data-publicly-available"></a>Reference Data Publicly Available</h2>
|
||
|
||
|
||
|
||
<p>All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this <code>AMR</code> package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find <a href='https://msberends.github.io/AMR/articles/datasets.html'>all download links on our website</a>, which is automatically updated with every code change.</p>
|
||
<h2 class="hasAnchor" id="read-more-on-our-website-"><a class="anchor" href="#read-more-on-our-website-"></a>Read more on Our Website!</h2>
|
||
|
||
|
||
|
||
<p>On our website <a href='https://msberends.github.io/AMR/'>https://msberends.github.io/AMR/</a> you can find <a href='https://msberends.github.io/AMR/articles/AMR.html'>a comprehensive tutorial</a> about how to conduct AMR data analysis, the <a href='https://msberends.github.io/AMR/reference/'>complete documentation of all functions</a> and <a href='https://msberends.github.io/AMR/articles/WHONET.html'>an example analysis using WHONET data</a>.</p>
|
||
|
||
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
|
||
<pre class="examples"><div class='input'><span class='co'># `example_isolates` is a data set available in the AMR package.</span>
|
||
<span class='co'># See ?example_isolates.</span>
|
||
|
||
<span class='co'># Base R ------------------------------------------------------------------</span>
|
||
|
||
<span class='co'># select columns 'IPM' (imipenem) and 'MEM' (meropenem)</span>
|
||
<span class='va'>example_isolates</span><span class='op'>[</span>, <span class='fu'>carbapenems</span><span class='op'>(</span><span class='op'>)</span><span class='op'>]</span>
|
||
</div><div class='output co'>#> <span class='message'><span style='color: #0000BB;'>ℹ For </span><span style='color: #0000BB;background-color: #E4E4E4;'>`carbapenems()`</span><span style='color: #0000BB;'> using columns: '</span><span style='color: #0000BB;font-weight: bold;'>IPM</span><span style='color: #0000BB;'>' (imipenem) and '</span><span style='color: #0000BB;font-weight: bold;'>MEM</span><span style='color: #0000BB;'>' (meropenem)</span><span></span></div><div class='output co'>#> IPM MEM
|
||
#> 1 <NA> <NA>
|
||
#> 2 <NA> <NA>
|
||
#> 3 <NA> <NA>
|
||
#> 4 <NA> <NA>
|
||
#> 5 <NA> <NA>
|
||
#> 6 <NA> <NA>
|
||
#> 7 <NA> <NA>
|
||
#> 8 <NA> <NA>
|
||
#> 9 <NA> <NA>
|
||
#> 10 <NA> <NA>
|
||
#> 11 <NA> <NA>
|
||
#> 12 <NA> <NA>
|
||
#> 13 S <NA>
|
||
#> 14 S <NA>
|
||
#> 15 <NA> <NA>
|
||
#> 16 S <NA>
|
||
#> 17 S <NA>
|
||
#> 18 <NA> <NA>
|
||
#> 19 <NA> <NA>
|
||
#> 20 <NA> <NA>
|
||
#> 21 <NA> <NA>
|
||
#> 22 S <NA>
|
||
#> 23 S <NA>
|
||
#> 24 S <NA>
|
||
#> 25 <NA> <NA>
|
||
#> 26 <NA> <NA>
|
||
#> 27 <NA> <NA>
|
||
#> 28 <NA> <NA>
|
||
#> 29 <NA> <NA>
|
||
#> 30 <NA> <NA>
|
||
#> 31 <NA> <NA>
|
||
#> 32 <NA> <NA>
|
||
#> 33 S <NA>
|
||
#> 34 S <NA>
|
||
#> 35 S <NA>
|
||
#> 36 S <NA>
|
||
#> 37 <NA> <NA>
|
||
#> 38 S <NA>
|
||
#> 39 S <NA>
|
||
#> 40 <NA> <NA>
|
||
#> 41 <NA> <NA>
|
||
#> 42 <NA> <NA>
|
||
#> 43 <NA> <NA>
|
||
#> 44 <NA> <NA>
|
||
#> 45 S <NA>
|
||
#> 46 <NA> <NA>
|
||
#> 47 <NA> <NA>
|
||
#> 48 S S
|
||
#> 49 S <NA>
|
||
#> 50 S <NA>
|
||
#> 51 S <NA>
|
||
#> 52 <NA> <NA>
|
||
#> 53 <NA> <NA>
|
||
#> 54 <NA> <NA>
|
||
#> 55 <NA> <NA>
|
||
#> 56 <NA> <NA>
|
||
#> 57 <NA> <NA>
|
||
#> 58 <NA> <NA>
|
||
#> 59 <NA> <NA>
|
||
#> 60 <NA> <NA>
|
||
#> 61 <NA> <NA>
|
||
#> 62 <NA> <NA>
|
||
#> 63 <NA> <NA>
|
||
#> 64 <NA> <NA>
|
||
#> 65 S <NA>
|
||
#> 66 S <NA>
|
||
#> 67 S <NA>
|
||
#> 68 <NA> <NA>
|
||
#> 69 <NA> <NA>
|
||
#> 70 <NA> <NA>
|
||
#> 71 S <NA>
|
||
#> 72 S <NA>
|
||
#> 73 S <NA>
|
||
#> 74 S <NA>
|
||
#> 75 <NA> <NA>
|
||
#> 76 S <NA>
|
||
#> 77 <NA> <NA>
|
||
#> 78 S <NA>
|
||
#> 79 S <NA>
|
||
#> 80 <NA> <NA>
|
||
#> 81 <NA> <NA>
|
||
#> 82 <NA> <NA>
|
||
#> 83 <NA> <NA>
|
||
#> 84 S <NA>
|
||
#> 85 S <NA>
|
||
#> 86 S <NA>
|
||
#> 87 S <NA>
|
||
#> 88 S <NA>
|
||
#> 89 S <NA>
|
||
#> 90 <NA> <NA>
|
||
#> 91 <NA> <NA>
|
||
#> 92 <NA> <NA>
|
||
#> 93 <NA> <NA>
|
||
#> 94 <NA> <NA>
|
||
#> 95 <NA> <NA>
|
||
#> 96 <NA> <NA>
|
||
#> 97 <NA> <NA>
|
||
#> 98 <NA> <NA>
|
||
#> 99 <NA> <NA>
|
||
#> 100 <NA> <NA>
|
||
#> 101 S <NA>
|
||
#> 102 <NA> <NA>
|
||
#> 103 <NA> <NA>
|
||
#> 104 <NA> <NA>
|
||
#> 105 <NA> <NA>
|
||
#> 106 <NA> <NA>
|
||
#> 107 <NA> <NA>
|
||
#> 108 <NA> <NA>
|
||
#> 109 <NA> <NA>
|
||
#> 110 <NA> <NA>
|
||
#> 111 <NA> <NA>
|
||
#> 112 <NA> <NA>
|
||
#> 113 <NA> <NA>
|
||
#> 114 <NA> <NA>
|
||
#> 115 <NA> <NA>
|
||
#> 116 S <NA>
|
||
#> 117 <NA> <NA>
|
||
#> 118 S <NA>
|
||
#> 119 S <NA>
|
||
#> 120 S <NA>
|
||
#> 121 S <NA>
|
||
#> 122 S <NA>
|
||
#> 123 <NA> <NA>
|
||
#> 124 <NA> <NA>
|
||
#> 125 <NA> <NA>
|
||
#> 126 <NA> <NA>
|
||
#> 127 <NA> <NA>
|
||
#> 128 <NA> <NA>
|
||
#> 129 S <NA>
|
||
#> 130 S <NA>
|
||
#> 131 <NA> <NA>
|
||
#> 132 <NA> <NA>
|
||
#> 133 <NA> <NA>
|
||
#> 134 <NA> <NA>
|
||
#> 135 <NA> <NA>
|
||
#> 136 <NA> <NA>
|
||
#> 137 <NA> <NA>
|
||
#> 138 <NA> <NA>
|
||
#> 139 S <NA>
|
||
#> 140 <NA> <NA>
|
||
#> 141 <NA> <NA>
|
||
#> 142 <NA> <NA>
|
||
#> 143 S <NA>
|
||
#> 144 <NA> <NA>
|
||
#> 145 <NA> <NA>
|
||
#> 146 <NA> <NA>
|
||
#> 147 <NA> <NA>
|
||
#> 148 <NA> <NA>
|
||
#> 149 <NA> <NA>
|
||
#> 150 <NA> <NA>
|
||
#> 151 <NA> <NA>
|
||
#> 152 <NA> <NA>
|
||
#> 153 S S
|
||
#> 154 S S
|
||
#> 155 S S
|
||
#> 156 <NA> <NA>
|
||
#> 157 <NA> <NA>
|
||
#> 158 <NA> <NA>
|
||
#> 159 <NA> <NA>
|
||
#> 160 S <NA>
|
||
#> 161 <NA> <NA>
|
||
#> 162 S <NA>
|
||
#> 163 <NA> <NA>
|
||
#> 164 <NA> <NA>
|
||
#> 165 <NA> <NA>
|
||
#> 166 <NA> <NA>
|
||
#> 167 <NA> <NA>
|
||
#> 168 <NA> <NA>
|
||
#> 169 <NA> <NA>
|
||
#> 170 <NA> <NA>
|
||
#> 171 <NA> <NA>
|
||
#> 172 <NA> <NA>
|
||
#> 173 <NA> <NA>
|
||
#> 174 <NA> <NA>
|
||
#> 175 <NA> <NA>
|
||
#> 176 S <NA>
|
||
#> 177 <NA> <NA>
|
||
#> 178 <NA> <NA>
|
||
#> 179 <NA> <NA>
|
||
#> 180 <NA> <NA>
|
||
#> 181 <NA> <NA>
|
||
#> 182 <NA> <NA>
|
||
#> 183 S <NA>
|
||
#> 184 S <NA>
|
||
#> 185 <NA> <NA>
|
||
#> 186 <NA> <NA>
|
||
#> 187 <NA> <NA>
|
||
#> 188 <NA> <NA>
|
||
#> 189 <NA> <NA>
|
||
#> 190 <NA> <NA>
|
||
#> 191 <NA> <NA>
|
||
#> 192 <NA> <NA>
|
||
#> 193 <NA> <NA>
|
||
#> 194 S <NA>
|
||
#> 195 S <NA>
|
||
#> 196 <NA> <NA>
|
||
#> 197 <NA> <NA>
|
||
#> 198 <NA> <NA>
|
||
#> 199 S <NA>
|
||
#> 200 <NA> <NA>
|
||
#> 201 <NA> <NA>
|
||
#> 202 <NA> <NA>
|
||
#> 203 <NA> <NA>
|
||
#> 204 S <NA>
|
||
#> 205 S <NA>
|
||
#> 206 <NA> <NA>
|
||
#> 207 S S
|
||
#> 208 S <NA>
|
||
#> 209 S <NA>
|
||
#> 210 S <NA>
|
||
#> 211 S <NA>
|
||
#> 212 I <NA>
|
||
#> 213 S <NA>
|
||
#> 214 <NA> <NA>
|
||
#> 215 <NA> <NA>
|
||
#> 216 S <NA>
|
||
#> 217 <NA> <NA>
|
||
#> 218 <NA> <NA>
|
||
#> 219 <NA> <NA>
|
||
#> 220 <NA> <NA>
|
||
#> 221 <NA> <NA>
|
||
#> 222 <NA> <NA>
|
||
#> 223 <NA> <NA>
|
||
#> 224 S <NA>
|
||
#> 225 S <NA>
|
||
#> 226 S <NA>
|
||
#> 227 S <NA>
|
||
#> 228 S <NA>
|
||
#> 229 <NA> <NA>
|
||
#> 230 S <NA>
|
||
#> 231 S <NA>
|
||
#> 232 S <NA>
|
||
#> 233 <NA> <NA>
|
||
#> 234 <NA> <NA>
|
||
#> 235 <NA> <NA>
|
||
#> 236 <NA> <NA>
|
||
#> 237 S S
|
||
#> 238 S <NA>
|
||
#> 239 S <NA>
|
||
#> 240 S S
|
||
#> 241 S <NA>
|
||
#> 242 S S
|
||
#> 243 <NA> <NA>
|
||
#> 244 <NA> <NA>
|
||
#> 245 <NA> <NA>
|
||
#> 246 S S
|
||
#> 247 S S
|
||
#> 248 S S
|
||
#> 249 <NA> <NA>
|
||
#> 250 <NA> <NA>
|
||
#> 251 S S
|
||
#> 252 <NA> <NA>
|
||
#> 253 S <NA>
|
||
#> 254 S <NA>
|
||
#> 255 <NA> <NA>
|
||
#> 256 <NA> <NA>
|
||
#> 257 <NA> <NA>
|
||
#> 258 <NA> <NA>
|
||
#> 259 <NA> <NA>
|
||
#> 260 <NA> <NA>
|
||
#> 261 <NA> S
|
||
#> 262 <NA> <NA>
|
||
#> 263 <NA> <NA>
|
||
#> 264 S <NA>
|
||
#> 265 S <NA>
|
||
#> 266 <NA> <NA>
|
||
#> 267 <NA> <NA>
|
||
#> 268 <NA> <NA>
|
||
#> 269 <NA> <NA>
|
||
#> 270 <NA> <NA>
|
||
#> 271 <NA> <NA>
|
||
#> 272 <NA> <NA>
|
||
#> 273 <NA> <NA>
|
||
#> 274 <NA> <NA>
|
||
#> 275 <NA> <NA>
|
||
#> 276 <NA> <NA>
|
||
#> 277 <NA> <NA>
|
||
#> 278 S S
|
||
#> 279 S S
|
||
#> 280 S S
|
||
#> 281 <NA> <NA>
|
||
#> 282 <NA> <NA>
|
||
#> 283 <NA> S
|
||
#> 284 <NA> S
|
||
#> 285 <NA> S
|
||
#> 286 <NA> S
|
||
#> 287 <NA> <NA>
|
||
#> 288 <NA> <NA>
|
||
#> 289 <NA> <NA>
|
||
#> 290 <NA> <NA>
|
||
#> 291 <NA> <NA>
|
||
#> 292 <NA> <NA>
|
||
#> 293 <NA> <NA>
|
||
#> 294 <NA> S
|
||
#> 295 <NA> <NA>
|
||
#> 296 <NA> <NA>
|
||
#> 297 <NA> <NA>
|
||
#> 298 S S
|
||
#> 299 S S
|
||
#> 300 <NA> <NA>
|
||
#> 301 <NA> <NA>
|
||
#> 302 <NA> <NA>
|
||
#> 303 <NA> <NA>
|
||
#> 304 <NA> <NA>
|
||
#> 305 <NA> <NA>
|
||
#> 306 <NA> <NA>
|
||
#> 307 S <NA>
|
||
#> 308 <NA> <NA>
|
||
#> 309 S S
|
||
#> 310 <NA> <NA>
|
||
#> 311 <NA> <NA>
|
||
#> 312 <NA> S
|
||
#> 313 S S
|
||
#> 314 S S
|
||
#> 315 S S
|
||
#> 316 S S
|
||
#> 317 <NA> <NA>
|
||
#> 318 <NA> <NA>
|
||
#> 319 <NA> <NA>
|
||
#> 320 <NA> S
|
||
#> 321 <NA> S
|
||
#> 322 S S
|
||
#> 323 S S
|
||
#> 324 <NA> <NA>
|
||
#> 325 <NA> <NA>
|
||
#> 326 <NA> <NA>
|
||
#> 327 <NA> <NA>
|
||
#> 328 <NA> <NA>
|
||
#> 329 <NA> <NA>
|
||
#> 330 <NA> <NA>
|
||
#> 331 <NA> <NA>
|
||
#> 332 <NA> <NA>
|
||
#> 333 <NA> <NA>
|
||
#> 334 <NA> <NA>
|
||
#> 335 <NA> <NA>
|
||
#> 336 <NA> <NA>
|
||
#> 337 R <NA>
|
||
#> 338 R <NA>
|
||
#> 339 <NA> <NA>
|
||
#> 340 S S
|
||
#> 341 <NA> <NA>
|
||
#> 342 <NA> <NA>
|
||
#> 343 S S
|
||
#> 344 S <NA>
|
||
#> 345 <NA> <NA>
|
||
#> 346 <NA> <NA>
|
||
#> 347 <NA> <NA>
|
||
#> 348 <NA> <NA>
|
||
#> 349 <NA> <NA>
|
||
#> 350 <NA> S
|
||
#> 351 <NA> <NA>
|
||
#> 352 <NA> <NA>
|
||
#> 353 <NA> <NA>
|
||
#> 354 S S
|
||
#> 355 <NA> <NA>
|
||
#> 356 S S
|
||
#> 357 <NA> <NA>
|
||
#> 358 S S
|
||
#> 359 <NA> <NA>
|
||
#> 360 S S
|
||
#> 361 S S
|
||
#> 362 <NA> <NA>
|
||
#> 363 <NA> S
|
||
#> 364 <NA> S
|
||
#> 365 <NA> S
|
||
#> 366 <NA> <NA>
|
||
#> 367 <NA> <NA>
|
||
#> 368 S S
|
||
#> 369 S S
|
||
#> 370 S S
|
||
#> 371 S S
|
||
#> 372 <NA> <NA>
|
||
#> 373 <NA> <NA>
|
||
#> 374 <NA> <NA>
|
||
#> 375 <NA> <NA>
|
||
#> 376 <NA> <NA>
|
||
#> 377 <NA> <NA>
|
||
#> 378 <NA> <NA>
|
||
#> 379 <NA> <NA>
|
||
#> 380 <NA> <NA>
|
||
#> 381 R R
|
||
#> 382 <NA> <NA>
|
||
#> 383 <NA> <NA>
|
||
#> 384 <NA> <NA>
|
||
#> 385 S S
|
||
#> 386 <NA> <NA>
|
||
#> 387 <NA> <NA>
|
||
#> 388 <NA> <NA>
|
||
#> 389 S S
|
||
#> 390 S S
|
||
#> 391 S S
|
||
#> 392 S <NA>
|
||
#> 393 S S
|
||
#> 394 <NA> <NA>
|
||
#> 395 S S
|
||
#> 396 <NA> <NA>
|
||
#> 397 <NA> <NA>
|
||
#> 398 <NA> <NA>
|
||
#> 399 <NA> <NA>
|
||
#> 400 S S
|
||
#> 401 S S
|
||
#> 402 S S
|
||
#> 403 S S
|
||
#> 404 <NA> <NA>
|
||
#> 405 S S
|
||
#> 406 <NA> S
|
||
#> 407 <NA> S
|
||
#> 408 <NA> S
|
||
#> 409 S S
|
||
#> 410 S S
|
||
#> 411 <NA> S
|
||
#> 412 <NA> <NA>
|
||
#> 413 <NA> <NA>
|
||
#> 414 <NA> <NA>
|
||
#> 415 S S
|
||
#> 416 <NA> <NA>
|
||
#> 417 <NA> <NA>
|
||
#> 418 <NA> <NA>
|
||
#> 419 <NA> <NA>
|
||
#> 420 <NA> <NA>
|
||
#> 421 <NA> <NA>
|
||
#> 422 <NA> <NA>
|
||
#> 423 <NA> <NA>
|
||
#> 424 S S
|
||
#> 425 S S
|
||
#> 426 <NA> <NA>
|
||
#> 427 <NA> <NA>
|
||
#> 428 <NA> <NA>
|
||
#> 429 <NA> <NA>
|
||
#> 430 <NA> <NA>
|
||
#> 431 <NA> <NA>
|
||
#> 432 <NA> <NA>
|
||
#> 433 <NA> <NA>
|
||
#> 434 <NA> <NA>
|
||
#> 435 <NA> <NA>
|
||
#> 436 <NA> <NA>
|
||
#> 437 <NA> <NA>
|
||
#> 438 S S
|
||
#> 439 S S
|
||
#> 440 S S
|
||
#> 441 S S
|
||
#> 442 <NA> <NA>
|
||
#> 443 <NA> S
|
||
#> 444 <NA> S
|
||
#> 445 <NA> <NA>
|
||
#> 446 <NA> <NA>
|
||
#> 447 <NA> <NA>
|
||
#> 448 <NA> <NA>
|
||
#> 449 S S
|
||
#> 450 S S
|
||
#> 451 <NA> <NA>
|
||
#> 452 <NA> <NA>
|
||
#> 453 <NA> <NA>
|
||
#> 454 <NA> <NA>
|
||
#> 455 <NA> <NA>
|
||
#> 456 <NA> <NA>
|
||
#> 457 S S
|
||
#> 458 S S
|
||
#> 459 <NA> <NA>
|
||
#> 460 <NA> <NA>
|
||
#> 461 R R
|
||
#> 462 R R
|
||
#> 463 R R
|
||
#> 464 <NA> <NA>
|
||
#> 465 <NA> <NA>
|
||
#> 466 <NA> <NA>
|
||
#> 467 <NA> S
|
||
#> 468 <NA> S
|
||
#> 469 S <NA>
|
||
#> 470 <NA> <NA>
|
||
#> 471 <NA> S
|
||
#> 472 <NA> S
|
||
#> 473 <NA> S
|
||
#> 474 <NA> S
|
||
#> 475 <NA> <NA>
|
||
#> 476 <NA> <NA>
|
||
#> 477 <NA> <NA>
|
||
#> 478 S S
|
||
#> 479 <NA> <NA>
|
||
#> 480 S S
|
||
#> 481 S S
|
||
#> 482 <NA> S
|
||
#> 483 <NA> S
|
||
#> 484 <NA> <NA>
|
||
#> 485 S S
|
||
#> 486 S S
|
||
#> 487 <NA> <NA>
|
||
#> 488 <NA> S
|
||
#> 489 S S
|
||
#> 490 S S
|
||
#> 491 S S
|
||
#> 492 S S
|
||
#> 493 <NA> S
|
||
#> 494 <NA> S
|
||
#> 495 <NA> S
|
||
#> 496 <NA> S
|
||
#> 497 <NA> <NA>
|
||
#> 498 <NA> <NA>
|
||
#> 499 <NA> <NA>
|
||
#> 500 <NA> <NA>
|
||
#> [ reached 'max' / getOption("max.print") -- omitted 1500 rows ]</div><div class='input'>
|
||
<span class='co'># select columns 'mo', 'AMK', 'GEN', 'KAN' and 'TOB'</span>
|
||
<span class='va'>example_isolates</span><span class='op'>[</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"mo"</span>, <span class='fu'>aminoglycosides</span><span class='op'>(</span><span class='op'>)</span><span class='op'>)</span><span class='op'>]</span>
|
||
</div><div class='output co'>#> <span class='message'></span><span style='color: #0000BB;'>ℹ For </span><span style='color: #0000BB;background-color: #E4E4E4;'>`aminoglycosides()`</span><span style='color: #0000BB;'> using columns: '</span><span style='color: #0000BB;font-weight: bold;'>AMK</span><span style='color: #0000BB;'>' (amikacin), '</span><span style='color: #0000BB;font-weight: bold;'>GEN</span><span style='color: #0000BB;'>'</span>
|
||
#> <span class='message'> (gentamicin), '</span><span style='color: #0000BB;font-weight: bold;'>KAN</span><span style='color: #0000BB;'>' (kanamycin) and '</span><span style='color: #0000BB;font-weight: bold;'>TOB</span><span style='color: #0000BB;'>' (tobramycin)</span><span></span></div><div class='output co'>#> mo GEN TOB AMK KAN
|
||
#> 1 B_ESCHR_COLI <NA> <NA> <NA> <NA>
|
||
#> 2 B_ESCHR_COLI <NA> <NA> <NA> <NA>
|
||
#> 3 B_STPHY_EPDR <NA> <NA> <NA> <NA>
|
||
#> 4 B_STPHY_EPDR <NA> <NA> <NA> <NA>
|
||
#> 5 B_STPHY_EPDR <NA> <NA> <NA> <NA>
|
||
#> 6 B_STPHY_EPDR <NA> <NA> <NA> <NA>
|
||
#> 7 B_STPHY_AURS <NA> S <NA> <NA>
|
||
#> 8 B_STPHY_AURS <NA> S <NA> <NA>
|
||
#> 9 B_STPHY_EPDR <NA> <NA> <NA> <NA>
|
||
#> 10 B_STPHY_EPDR <NA> <NA> <NA> <NA>
|
||
#> 11 B_STPHY_EPDR <NA> <NA> <NA> <NA>
|
||
#> 12 B_STPHY_EPDR <NA> <NA> <NA> <NA>
|
||
#> 13 B_ESCHR_COLI <NA> S <NA> <NA>
|
||
#> 14 B_ESCHR_COLI <NA> S <NA> <NA>
|
||
#> 15 B_CTRBC_FRND <NA> <NA> <NA> <NA>
|
||
#> 16 B_PROTS_MRBL <NA> <NA> <NA> <NA>
|
||
#> 17 B_PROTS_MRBL <NA> <NA> <NA> <NA>
|
||
#> 18 B_STPHY_EPDR <NA> <NA> <NA> <NA>
|
||
#> 19 B_STPHY_EPDR <NA> <NA> <NA> <NA>
|
||
#> 20 B_STPHY_CONS <NA> <NA> <NA> <NA>
|
||
#> 21 B_STPHY_HMNS <NA> <NA> <NA> <NA>
|
||
#> 22 B_SERRT_MRCS <NA> <NA> <NA> <NA>
|
||
#> 23 B_SERRT_MRCS <NA> <NA> <NA> <NA>
|
||
#> 24 B_SERRT_MRCS <NA> <NA> <NA> <NA>
|
||
#> 25 B_STPHY_CONS <NA> <NA> <NA> <NA>
|
||
#> 26 B_STPHY_CONS <NA> S <NA> <NA>
|
||
#> 27 B_STPHY_EPDR <NA> <NA> <NA> <NA>
|
||
#> 28 B_ENTRC_FACM R R R R
|
||
#> 29 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 30 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 31 B_STPHY_HMNS S <NA> <NA> <NA>
|
||
#> 32 B_STPHY_EPDR S <NA> <NA> <NA>
|
||
#> 33 B_KLBSL_PNMN S S <NA> <NA>
|
||
#> 34 B_KLBSL_PNMN S S <NA> <NA>
|
||
#> 35 B_ESCHR_COLI S <NA> <NA> <NA>
|
||
#> 36 B_PSDMN_AERG I S <NA> R
|
||
#> 37 B_STPHY_CONS R R R R
|
||
#> 38 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 39 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 40 B_STRPT_SNGN R R R R
|
||
#> 41 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 42 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 43 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 44 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 45 B_ENTRC_FCLS R R R R
|
||
#> 46 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 47 F_CANDD_GLBR <NA> <NA> <NA> <NA>
|
||
#> 48 B_STRPT_GRPB R R R R
|
||
#> 49 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 50 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 51 B_KLBSL_PNMN S S <NA> <NA>
|
||
#> 52 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 53 B_STPHY_CONS R R R R
|
||
#> 54 B_STPHY_CONS R R R R
|
||
#> 55 B_STRPT_PNMN R R R R
|
||
#> 56 B_STRPT_PNMN R R R R
|
||
#> 57 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 58 B_STRPT_ANGN R R R R
|
||
#> 59 B_STRPT_ANGN R R R R
|
||
#> 60 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 61 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 62 B_STPHY_EPDR R R R R
|
||
#> 63 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 64 B_STRPT_PNMN R R R R
|
||
#> 65 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 66 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 67 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 68 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 69 B_CRYNB <NA> <NA> <NA> <NA>
|
||
#> 70 B_STPHY_HMNS S <NA> <NA> <NA>
|
||
#> 71 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 72 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 73 B_ENTRC_FCLS R R R R
|
||
#> 74 B_ENTRC_FCLS R R R R
|
||
#> 75 B_STPHY_HMNS I <NA> <NA> <NA>
|
||
#> 76 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 77 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 78 B_PSDMN_AERG I S <NA> R
|
||
#> 79 B_PSDMN_AERG I S <NA> R
|
||
#> 80 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 81 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 82 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 83 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 84 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 85 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 86 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 87 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 88 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 89 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 90 B_STRPT_SLVR R R R R
|
||
#> 91 B_STRPT_SLVR R R R R
|
||
#> 92 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 93 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 94 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 95 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 96 B_CMPYL_JEJN <NA> <NA> <NA> <NA>
|
||
#> 97 B_STPHY_EPDR S S <NA> <NA>
|
||
#> 98 B_MCRCCC S R <NA> <NA>
|
||
#> 99 B_STPHY_EPDR S <NA> <NA> <NA>
|
||
#> 100 B_STRPT_PNMN R R R R
|
||
#> 101 B_ACNTB S S <NA> <NA>
|
||
#> 102 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 103 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 104 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 105 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 106 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 107 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 108 B_STPHY_EPDR R R R R
|
||
#> 109 B_STRPT_PNMN R R R R
|
||
#> 110 B_STRPT_PNMN R R R R
|
||
#> 111 B_STPHY_CONS R R R R
|
||
#> 112 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 113 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 114 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 115 B_STPHY_HMNS S <NA> <NA> <NA>
|
||
#> 116 B_PROTS_MRBL S S <NA> <NA>
|
||
#> 117 B_BCTRD_FRGL <NA> <NA> <NA> <NA>
|
||
#> 118 B_PROTS_MRBL S S <NA> <NA>
|
||
#> 119 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 120 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 121 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 122 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 123 B_STPHY_EPDR R R R R
|
||
#> 124 B_STPHY_EPDR R R R R
|
||
#> 125 B_STPHY_CONS R R R R
|
||
#> 126 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 127 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 128 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 129 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 130 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 131 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 132 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 133 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 134 B_STRPT_PNMN R R R R
|
||
#> 135 B_CRYNB <NA> <NA> <NA> <NA>
|
||
#> 136 B_STRPT_PNMN R R R R
|
||
#> 137 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 138 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 139 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 140 B_STPHY_HMNS R R R R
|
||
#> 141 B_STPHY_CONS R R R R
|
||
#> 142 B_STPHY_EPDR S <NA> <NA> <NA>
|
||
#> 143 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 144 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 145 B_STPHY_CONS R R R R
|
||
#> 146 B_STPHY_CONS R R R R
|
||
#> 147 B_STRPT_PNMN R R R R
|
||
#> 148 B_STRPT_PNMN R R R R
|
||
#> 149 B_STRPT_PNMN R R R R
|
||
#> 150 B_STRPT_PNMN R R R R
|
||
#> 151 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 152 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 153 B_STRPT_PYGN R R R R
|
||
#> 154 B_STRPT_GRPA R R R R
|
||
#> 155 B_STRPT_GRPA R R R R
|
||
#> 156 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 157 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 158 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 159 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 160 B_ENTRC <NA> <NA> <NA> <NA>
|
||
#> 161 B_STPHY_CONS R R R R
|
||
#> 162 B_ENTRC <NA> <NA> <NA> <NA>
|
||
#> 163 B_STPHY_CONS R R R R
|
||
#> 164 B_STPHY_CONS I <NA> <NA> <NA>
|
||
#> 165 B_STPHY_CONS I <NA> <NA> <NA>
|
||
#> 166 B_STPHY_CONS R R R R
|
||
#> 167 B_CRYNB <NA> <NA> <NA> <NA>
|
||
#> 168 B_STPHY_EPDR R R R R
|
||
#> 169 B_STPHY_EPDR S <NA> <NA> <NA>
|
||
#> 170 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 171 B_STPHY_HMNS S <NA> <NA> <NA>
|
||
#> 172 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 173 B_HMPHL_PRNF <NA> <NA> <NA> <NA>
|
||
#> 174 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 175 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 176 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 177 B_STRPT_PNMN R R R R
|
||
#> 178 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 179 B_STRPT_MITS R R R R
|
||
#> 180 B_STRPT_MITS R R R R
|
||
#> 181 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 182 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 183 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 184 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 185 B_STPHY_EPDR S <NA> <NA> <NA>
|
||
#> 186 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 187 B_STPHY_CONS R R R R
|
||
#> 188 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 189 B_STPHY_EPDR S <NA> <NA> <NA>
|
||
#> 190 B_STPHY_EPDR R R R R
|
||
#> 191 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> 192 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 193 B_STRPT_PNMN R R R R
|
||
#> 194 B_KLBSL_PNMN S S <NA> <NA>
|
||
#> 195 B_KLBSL_PNMN S S <NA> <NA>
|
||
#> 196 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 197 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 198 B_STPHY_CONS S <NA> <NA> <NA>
|
||
#> 199 B_ESCHR_COLI S S <NA> <NA>
|
||
#> 200 B_STPHY_AURS S <NA> <NA> <NA>
|
||
#> [ reached 'max' / getOption("max.print") -- omitted 1800 rows ]</div><div class='input'>
|
||
<span class='co'># filter using any() or all()</span>
|
||
<span class='va'>example_isolates</span><span class='op'>[</span><span class='fu'><a href='https://rdrr.io/r/base/any.html'>any</a></span><span class='op'>(</span><span class='fu'>carbapenems</span><span class='op'>(</span><span class='op'>)</span> <span class='op'>==</span> <span class='st'>"R"</span><span class='op'>)</span>, <span class='op'>]</span>
|
||
</div><div class='output co'>#> <span class='message'></span><span style='color: #0000BB;'>ℹ Assuming a filter on all 2 carbapenems. Wrap around </span><span style='color: #0000BB;background-color: #E4E4E4;'>`all()`</span><span style='color: #0000BB;'> or </span><span style='color: #0000BB;background-color: #E4E4E4;'>`any()`</span><span style='color: #0000BB;'> to</span>
|
||
#> <span class='message'> prevent this note.</span><span></span></div><div class='output co'>#> date hospital_id ward_icu ward_clinical ward_outpatient age gender
|
||
#> 381 2004-11-03 B TRUE FALSE FALSE 80 F
|
||
#> 461 2005-04-21 B TRUE FALSE FALSE 82 F
|
||
#> 462 2005-04-22 B TRUE FALSE FALSE 82 F
|
||
#> 463 2005-04-22 B TRUE FALSE FALSE 82 F
|
||
#> 698 2007-02-21 D FALSE TRUE FALSE 61 F
|
||
#> 799 2007-12-15 A FALSE TRUE FALSE 72 M
|
||
#> 918 2008-12-06 D FALSE TRUE FALSE 43 F
|
||
#> 1147 2011-03-16 B TRUE TRUE FALSE 83 M
|
||
#> 1149 2011-03-19 B TRUE TRUE FALSE 83 M
|
||
#> 1156 2011-04-06 D TRUE TRUE FALSE 74 M
|
||
#> 1157 2011-04-11 C FALSE TRUE FALSE 74 M
|
||
#> 1172 2011-05-09 D TRUE TRUE FALSE 82 F
|
||
#> 1210 2011-08-01 D FALSE TRUE FALSE 63 M
|
||
#> 1213 2011-08-18 B FALSE TRUE FALSE 75 F
|
||
#> 1217 2011-09-01 B FALSE TRUE FALSE 71 M
|
||
#> 1218 2011-09-01 B FALSE TRUE FALSE 71 M
|
||
#> 1242 2011-11-04 D FALSE TRUE FALSE 70 M
|
||
#> 1243 2011-11-07 D FALSE TRUE FALSE 70 M
|
||
#> 1246 2011-11-10 D FALSE TRUE FALSE 90 F
|
||
#> 1259 2012-02-06 D TRUE TRUE FALSE 80 M
|
||
#> patient_id mo PEN OXA FLC AMX AMC AMP TZP CZO FEP CXM
|
||
#> 381 D65308 B_STNTR_MLTP R <NA> <NA> R R R R R <NA> R
|
||
#> 461 452212 B_ENTRC <NA> <NA> <NA> <NA> <NA> <NA> R <NA> <NA> <NA>
|
||
#> 462 452212 B_ENTRC <NA> <NA> <NA> <NA> <NA> <NA> R <NA> <NA> <NA>
|
||
#> 463 452212 B_ENTRC_FACM <NA> <NA> <NA> <NA> <NA> <NA> R R R R
|
||
#> 698 8BBC46 B_ENTRC_FACM <NA> <NA> <NA> <NA> <NA> <NA> R R R R
|
||
#> 799 401043 B_ENTRC_FACM <NA> <NA> <NA> <NA> <NA> <NA> R R R R
|
||
#> 918 501361 B_STNTR_MLTP R <NA> <NA> R R R R R <NA> R
|
||
#> 1147 0D7D34 B_STPHY_EPDR R R R R R R R R R R
|
||
#> 1149 0D7D34 B_STPHY_EPDR R R R R R R R R R R
|
||
#> 1156 329273 B_STPHY_CONS R R R R R R R R R R
|
||
#> 1157 A26784 B_STPHY_CONS R R R R R R R R R R
|
||
#> 1172 207325 B_ENTRC_FACM <NA> <NA> <NA> <NA> <NA> <NA> R R R R
|
||
#> 1210 F8DB34 B_STPHY_CONS R R R R R R R R R R
|
||
#> 1213 A81782 B_STPHY_CONS R R R R R R R R R R
|
||
#> 1217 50C8DB B_STPHY_EPDR R R R R R R R R R R
|
||
#> 1218 50C8DB B_STPHY_CONS R R R R R R R R R R
|
||
#> 1242 443847 B_STPHY_CONS R R R R R R R R R R
|
||
#> 1243 116866 B_STPHY_CONS R R R R R R R R R R
|
||
#> 1246 F86227 B_STPHY_CONS R R R R R R R R R R
|
||
#> 1259 967247 B_STPHY_CONS R R R R R R R R R R
|
||
#> FOX CTX CAZ CRO GEN TOB AMK KAN TMP SXT NIT FOS LNZ CIP MFX
|
||
#> 381 R R R R R R R R R S <NA> R R <NA> <NA>
|
||
#> 461 <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA>
|
||
#> 462 <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA>
|
||
#> 463 R R R R R R R R R R <NA> <NA> <NA> <NA> <NA>
|
||
#> 698 R R R R R R R R R R <NA> <NA> <NA> <NA> <NA>
|
||
#> 799 R R R R R R R R R R <NA> <NA> <NA> R <NA>
|
||
#> 918 R R R R R R R R R S R R R S <NA>
|
||
#> 1147 R R R R I <NA> <NA> <NA> R <NA> <NA> <NA> <NA> S <NA>
|
||
#> 1149 R R R R I <NA> <NA> <NA> R <NA> <NA> <NA> <NA> S <NA>
|
||
#> 1156 R R R R S <NA> <NA> <NA> R R <NA> <NA> <NA> R <NA>
|
||
#> 1157 R R R R I <NA> <NA> <NA> R <NA> <NA> <NA> <NA> I <NA>
|
||
#> 1172 R R R R R R R R R R <NA> <NA> <NA> <NA> <NA>
|
||
#> 1210 R R R R S <NA> <NA> <NA> R R <NA> <NA> <NA> R <NA>
|
||
#> 1213 R R R R S <NA> <NA> <NA> R <NA> <NA> <NA> <NA> R <NA>
|
||
#> 1217 R R R R I <NA> <NA> <NA> R <NA> <NA> <NA> <NA> S <NA>
|
||
#> 1218 R R R R S <NA> <NA> <NA> S S <NA> <NA> <NA> S <NA>
|
||
#> 1242 R R R R S <NA> <NA> <NA> S S <NA> <NA> <NA> S <NA>
|
||
#> 1243 R R R R S <NA> <NA> <NA> R S <NA> <NA> <NA> R <NA>
|
||
#> 1246 R R R R S <NA> <NA> <NA> R R <NA> <NA> <NA> R <NA>
|
||
#> 1259 R R R R S <NA> <NA> <NA> R R <NA> <NA> <NA> R <NA>
|
||
#> VAN TEC TCY TGC DOX ERY CLI AZM IPM MEM MTR CHL COL MUP RIF
|
||
#> 381 R R R <NA> R R R R R R <NA> <NA> R <NA> R
|
||
#> 461 S <NA> R <NA> <NA> R <NA> R R R <NA> <NA> R <NA> <NA>
|
||
#> 462 S <NA> R <NA> <NA> R <NA> R R R <NA> <NA> R <NA> <NA>
|
||
#> 463 S <NA> R <NA> <NA> R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 698 S <NA> S <NA> <NA> R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 799 S <NA> S <NA> <NA> R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 918 R R R <NA> R R R R R R <NA> <NA> R <NA> R
|
||
#> 1147 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1149 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1156 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1157 S <NA> <NA> <NA> S R S R R R <NA> <NA> R <NA> <NA>
|
||
#> 1172 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1210 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1213 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1217 S <NA> <NA> <NA> S S S S R R <NA> <NA> R <NA> S
|
||
#> 1218 S <NA> <NA> <NA> S R S R R R <NA> <NA> R <NA> S
|
||
#> 1242 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1243 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1246 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1259 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA>
|
||
#> [ reached 'max' / getOption("max.print") -- omitted 29 rows ]</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span><span class='op'>(</span><span class='va'>example_isolates</span>, <span class='fu'><a href='https://rdrr.io/r/base/any.html'>any</a></span><span class='op'>(</span><span class='fu'>carbapenems</span><span class='op'>(</span><span class='op'>)</span> <span class='op'>==</span> <span class='st'>"R"</span><span class='op'>)</span><span class='op'>)</span>
|
||
</div><div class='output co'>#> <span class='message'></span><span style='color: #0000BB;'>ℹ Assuming a filter on all 2 carbapenems. Wrap around </span><span style='color: #0000BB;background-color: #E4E4E4;'>`all()`</span><span style='color: #0000BB;'> or </span><span style='color: #0000BB;background-color: #E4E4E4;'>`any()`</span><span style='color: #0000BB;'> to</span>
|
||
#> <span class='message'> prevent this note.</span><span></span></div><div class='output co'>#> date hospital_id ward_icu ward_clinical ward_outpatient age gender
|
||
#> 381 2004-11-03 B TRUE FALSE FALSE 80 F
|
||
#> 461 2005-04-21 B TRUE FALSE FALSE 82 F
|
||
#> 462 2005-04-22 B TRUE FALSE FALSE 82 F
|
||
#> 463 2005-04-22 B TRUE FALSE FALSE 82 F
|
||
#> 698 2007-02-21 D FALSE TRUE FALSE 61 F
|
||
#> 799 2007-12-15 A FALSE TRUE FALSE 72 M
|
||
#> 918 2008-12-06 D FALSE TRUE FALSE 43 F
|
||
#> 1147 2011-03-16 B TRUE TRUE FALSE 83 M
|
||
#> 1149 2011-03-19 B TRUE TRUE FALSE 83 M
|
||
#> 1156 2011-04-06 D TRUE TRUE FALSE 74 M
|
||
#> 1157 2011-04-11 C FALSE TRUE FALSE 74 M
|
||
#> 1172 2011-05-09 D TRUE TRUE FALSE 82 F
|
||
#> 1210 2011-08-01 D FALSE TRUE FALSE 63 M
|
||
#> 1213 2011-08-18 B FALSE TRUE FALSE 75 F
|
||
#> 1217 2011-09-01 B FALSE TRUE FALSE 71 M
|
||
#> 1218 2011-09-01 B FALSE TRUE FALSE 71 M
|
||
#> 1242 2011-11-04 D FALSE TRUE FALSE 70 M
|
||
#> 1243 2011-11-07 D FALSE TRUE FALSE 70 M
|
||
#> 1246 2011-11-10 D FALSE TRUE FALSE 90 F
|
||
#> 1259 2012-02-06 D TRUE TRUE FALSE 80 M
|
||
#> patient_id mo PEN OXA FLC AMX AMC AMP TZP CZO FEP CXM
|
||
#> 381 D65308 B_STNTR_MLTP R <NA> <NA> R R R R R <NA> R
|
||
#> 461 452212 B_ENTRC <NA> <NA> <NA> <NA> <NA> <NA> R <NA> <NA> <NA>
|
||
#> 462 452212 B_ENTRC <NA> <NA> <NA> <NA> <NA> <NA> R <NA> <NA> <NA>
|
||
#> 463 452212 B_ENTRC_FACM <NA> <NA> <NA> <NA> <NA> <NA> R R R R
|
||
#> 698 8BBC46 B_ENTRC_FACM <NA> <NA> <NA> <NA> <NA> <NA> R R R R
|
||
#> 799 401043 B_ENTRC_FACM <NA> <NA> <NA> <NA> <NA> <NA> R R R R
|
||
#> 918 501361 B_STNTR_MLTP R <NA> <NA> R R R R R <NA> R
|
||
#> 1147 0D7D34 B_STPHY_EPDR R R R R R R R R R R
|
||
#> 1149 0D7D34 B_STPHY_EPDR R R R R R R R R R R
|
||
#> 1156 329273 B_STPHY_CONS R R R R R R R R R R
|
||
#> 1157 A26784 B_STPHY_CONS R R R R R R R R R R
|
||
#> 1172 207325 B_ENTRC_FACM <NA> <NA> <NA> <NA> <NA> <NA> R R R R
|
||
#> 1210 F8DB34 B_STPHY_CONS R R R R R R R R R R
|
||
#> 1213 A81782 B_STPHY_CONS R R R R R R R R R R
|
||
#> 1217 50C8DB B_STPHY_EPDR R R R R R R R R R R
|
||
#> 1218 50C8DB B_STPHY_CONS R R R R R R R R R R
|
||
#> 1242 443847 B_STPHY_CONS R R R R R R R R R R
|
||
#> 1243 116866 B_STPHY_CONS R R R R R R R R R R
|
||
#> 1246 F86227 B_STPHY_CONS R R R R R R R R R R
|
||
#> 1259 967247 B_STPHY_CONS R R R R R R R R R R
|
||
#> FOX CTX CAZ CRO GEN TOB AMK KAN TMP SXT NIT FOS LNZ CIP MFX
|
||
#> 381 R R R R R R R R R S <NA> R R <NA> <NA>
|
||
#> 461 <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA>
|
||
#> 462 <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA>
|
||
#> 463 R R R R R R R R R R <NA> <NA> <NA> <NA> <NA>
|
||
#> 698 R R R R R R R R R R <NA> <NA> <NA> <NA> <NA>
|
||
#> 799 R R R R R R R R R R <NA> <NA> <NA> R <NA>
|
||
#> 918 R R R R R R R R R S R R R S <NA>
|
||
#> 1147 R R R R I <NA> <NA> <NA> R <NA> <NA> <NA> <NA> S <NA>
|
||
#> 1149 R R R R I <NA> <NA> <NA> R <NA> <NA> <NA> <NA> S <NA>
|
||
#> 1156 R R R R S <NA> <NA> <NA> R R <NA> <NA> <NA> R <NA>
|
||
#> 1157 R R R R I <NA> <NA> <NA> R <NA> <NA> <NA> <NA> I <NA>
|
||
#> 1172 R R R R R R R R R R <NA> <NA> <NA> <NA> <NA>
|
||
#> 1210 R R R R S <NA> <NA> <NA> R R <NA> <NA> <NA> R <NA>
|
||
#> 1213 R R R R S <NA> <NA> <NA> R <NA> <NA> <NA> <NA> R <NA>
|
||
#> 1217 R R R R I <NA> <NA> <NA> R <NA> <NA> <NA> <NA> S <NA>
|
||
#> 1218 R R R R S <NA> <NA> <NA> S S <NA> <NA> <NA> S <NA>
|
||
#> 1242 R R R R S <NA> <NA> <NA> S S <NA> <NA> <NA> S <NA>
|
||
#> 1243 R R R R S <NA> <NA> <NA> R S <NA> <NA> <NA> R <NA>
|
||
#> 1246 R R R R S <NA> <NA> <NA> R R <NA> <NA> <NA> R <NA>
|
||
#> 1259 R R R R S <NA> <NA> <NA> R R <NA> <NA> <NA> R <NA>
|
||
#> VAN TEC TCY TGC DOX ERY CLI AZM IPM MEM MTR CHL COL MUP RIF
|
||
#> 381 R R R <NA> R R R R R R <NA> <NA> R <NA> R
|
||
#> 461 S <NA> R <NA> <NA> R <NA> R R R <NA> <NA> R <NA> <NA>
|
||
#> 462 S <NA> R <NA> <NA> R <NA> R R R <NA> <NA> R <NA> <NA>
|
||
#> 463 S <NA> R <NA> <NA> R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 698 S <NA> S <NA> <NA> R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 799 S <NA> S <NA> <NA> R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 918 R R R <NA> R R R R R R <NA> <NA> R <NA> R
|
||
#> 1147 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1149 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1156 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1157 S <NA> <NA> <NA> S R S R R R <NA> <NA> R <NA> <NA>
|
||
#> 1172 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1210 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1213 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1217 S <NA> <NA> <NA> S S S S R R <NA> <NA> R <NA> S
|
||
#> 1218 S <NA> <NA> <NA> S R S R R R <NA> <NA> R <NA> S
|
||
#> 1242 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1243 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1246 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1259 S <NA> <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA>
|
||
#> [ reached 'max' / getOption("max.print") -- omitted 29 rows ]</div><div class='input'>
|
||
<span class='co'># filter on any or all results in the carbapenem columns (i.e., IPM, MEM):</span>
|
||
<span class='va'>example_isolates</span><span class='op'>[</span><span class='fu'><a href='https://rdrr.io/r/base/any.html'>any</a></span><span class='op'>(</span><span class='fu'>carbapenems</span><span class='op'>(</span><span class='op'>)</span><span class='op'>)</span>, <span class='op'>]</span>
|
||
</div><div class='output co'>#> <span class='message'></span><span style='color: #0000BB;'>ℹ Filtering any of columns '</span><span style='color: #0000BB;font-weight: bold;'>IPM</span><span style='color: #0000BB;'>' and '</span><span style='color: #0000BB;font-weight: bold;'>MEM</span><span style='color: #0000BB;'>' to contain value "R", "S" or "I"</span><span></span></div><div class='output co'>#> date hospital_id ward_icu ward_clinical ward_outpatient age gender
|
||
#> 13 2002-01-19 D FALSE TRUE FALSE 71 M
|
||
#> 14 2002-01-19 D FALSE TRUE FALSE 71 M
|
||
#> 16 2002-01-22 B TRUE FALSE FALSE 50 M
|
||
#> 17 2002-01-22 B TRUE FALSE FALSE 50 M
|
||
#> 22 2002-02-05 B TRUE FALSE FALSE 45 F
|
||
#> 23 2002-02-05 B TRUE FALSE FALSE 45 F
|
||
#> 24 2002-02-05 B TRUE FALSE FALSE 45 F
|
||
#> 33 2002-02-27 D FALSE TRUE FALSE 85 F
|
||
#> 34 2002-02-27 D FALSE TRUE FALSE 85 F
|
||
#> 35 2002-03-08 C FALSE TRUE FALSE 69 M
|
||
#> 36 2002-03-16 C FALSE TRUE FALSE 69 M
|
||
#> 38 2002-04-01 B TRUE FALSE FALSE 46 F
|
||
#> 39 2002-04-01 B TRUE FALSE FALSE 46 F
|
||
#> 45 2002-04-08 A TRUE TRUE FALSE 78 M
|
||
#> 48 2002-04-14 C FALSE FALSE TRUE 73 M
|
||
#> 49 2002-04-23 B TRUE FALSE FALSE 69 F
|
||
#> 50 2002-04-23 B TRUE FALSE FALSE 69 F
|
||
#> 51 2002-04-26 D FALSE TRUE FALSE 79 M
|
||
#> 65 2002-06-05 D FALSE TRUE FALSE 20 F
|
||
#> 66 2002-06-06 D FALSE TRUE FALSE 20 F
|
||
#> patient_id mo PEN OXA FLC AMX AMC AMP TZP CZO FEP CXM FOX
|
||
#> 13 738003 B_ESCHR_COLI R <NA> <NA> <NA> I <NA> <NA> <NA> <NA> S <NA>
|
||
#> 14 738003 B_ESCHR_COLI R <NA> <NA> <NA> I <NA> <NA> <NA> <NA> S <NA>
|
||
#> 16 F35553 B_PROTS_MRBL R <NA> <NA> <NA> I <NA> <NA> <NA> <NA> S <NA>
|
||
#> 17 F35553 B_PROTS_MRBL R <NA> <NA> <NA> I <NA> <NA> <NA> <NA> S <NA>
|
||
#> 22 067927 B_SERRT_MRCS R <NA> <NA> R R R <NA> R <NA> R R
|
||
#> 23 067927 B_SERRT_MRCS R <NA> <NA> R R R <NA> R <NA> R R
|
||
#> 24 067927 B_SERRT_MRCS R <NA> <NA> R R R <NA> R <NA> R R
|
||
#> 33 066895 B_KLBSL_PNMN R <NA> <NA> R I R <NA> <NA> <NA> S <NA>
|
||
#> 34 066895 B_KLBSL_PNMN R <NA> <NA> R I R <NA> <NA> <NA> S <NA>
|
||
#> 35 4FC193 B_ESCHR_COLI R <NA> <NA> R R R <NA> <NA> <NA> R <NA>
|
||
#> 36 4FC193 B_PSDMN_AERG R <NA> <NA> R R R <NA> R <NA> R R
|
||
#> 38 496896 B_ESCHR_COLI R <NA> <NA> <NA> I <NA> <NA> <NA> <NA> I <NA>
|
||
#> 39 496896 B_ESCHR_COLI R <NA> <NA> <NA> I <NA> <NA> <NA> <NA> I <NA>
|
||
#> 45 130252 B_ENTRC_FCLS <NA> <NA> <NA> <NA> S <NA> <NA> R R R R
|
||
#> 48 F30196 B_STRPT_GRPB S <NA> S S S S S S S S S
|
||
#> 49 EE2510 B_ESCHR_COLI R <NA> <NA> <NA> I <NA> R <NA> <NA> I <NA>
|
||
#> 50 EE2510 B_ESCHR_COLI R <NA> <NA> <NA> I <NA> R <NA> <NA> I <NA>
|
||
#> 51 D10443 B_KLBSL_PNMN R <NA> <NA> R S R <NA> <NA> <NA> S <NA>
|
||
#> 65 24D393 B_ESCHR_COLI R <NA> <NA> <NA> I <NA> <NA> <NA> <NA> S <NA>
|
||
#> 66 24D393 B_ESCHR_COLI R <NA> <NA> <NA> I <NA> <NA> <NA> <NA> S <NA>
|
||
#> CTX CAZ CRO GEN TOB AMK KAN TMP SXT NIT FOS LNZ CIP MFX VAN TEC
|
||
#> 13 S <NA> S <NA> S <NA> <NA> S S <NA> <NA> R <NA> <NA> R R
|
||
#> 14 S <NA> S <NA> S <NA> <NA> S S <NA> <NA> R <NA> <NA> R R
|
||
#> 16 S S S <NA> <NA> <NA> <NA> S S R <NA> R S <NA> R R
|
||
#> 17 S S S <NA> <NA> <NA> <NA> S S R <NA> R S <NA> R R
|
||
#> 22 <NA> <NA> <NA> <NA> <NA> <NA> <NA> S S R <NA> R S <NA> R R
|
||
#> 23 <NA> <NA> <NA> <NA> <NA> <NA> <NA> S S R <NA> R S <NA> R R
|
||
#> 24 <NA> <NA> <NA> <NA> <NA> <NA> <NA> S S R <NA> R S <NA> R R
|
||
#> 33 S S S S S <NA> <NA> S S S <NA> R S <NA> R R
|
||
#> 34 S S S S S <NA> <NA> S S S <NA> R S <NA> R R
|
||
#> 35 S S S S <NA> <NA> <NA> S S <NA> <NA> R S <NA> R R
|
||
#> 36 R R R I S <NA> R R R <NA> <NA> R I <NA> R R
|
||
#> 38 S S S S S <NA> <NA> S S S <NA> R S <NA> R R
|
||
#> 39 S S S S S <NA> <NA> S S S <NA> R S <NA> R R
|
||
#> 45 R R R R R R R R R <NA> <NA> <NA> <NA> <NA> S <NA>
|
||
#> 48 S R S R R R R S S <NA> <NA> <NA> <NA> <NA> S <NA>
|
||
#> 49 S S S S S <NA> <NA> R R R <NA> R R R R R
|
||
#> 50 S S S S S <NA> <NA> R R R <NA> R R R R R
|
||
#> 51 S S S S S <NA> <NA> S S S <NA> R S <NA> R R
|
||
#> 65 S S S S S <NA> <NA> S S S <NA> R S <NA> R R
|
||
#> 66 S S S S S <NA> <NA> S S S <NA> R S <NA> R R
|
||
#> TCY TGC DOX ERY CLI AZM IPM MEM MTR CHL COL MUP RIF
|
||
#> 13 <NA> <NA> <NA> R R R S <NA> <NA> <NA> <NA> <NA> R
|
||
#> 14 <NA> <NA> <NA> R R R S <NA> <NA> <NA> <NA> <NA> R
|
||
#> 16 R R R R R R S <NA> <NA> <NA> R <NA> R
|
||
#> 17 R R R R R R S <NA> <NA> <NA> R <NA> R
|
||
#> 22 R R R R R R S <NA> <NA> <NA> R <NA> R
|
||
#> 23 R R R R R R S <NA> <NA> <NA> R <NA> R
|
||
#> 24 R R R R R R S <NA> <NA> <NA> R <NA> R
|
||
#> 33 <NA> <NA> <NA> R R R S <NA> <NA> <NA> <NA> <NA> R
|
||
#> 34 <NA> <NA> <NA> R R R S <NA> <NA> <NA> <NA> <NA> R
|
||
#> 35 <NA> <NA> <NA> R R R S <NA> <NA> <NA> <NA> <NA> R
|
||
#> 36 R R R R R R S <NA> <NA> R <NA> <NA> R
|
||
#> 38 <NA> <NA> <NA> R R R S <NA> <NA> <NA> <NA> <NA> R
|
||
#> 39 <NA> <NA> <NA> R R R S <NA> <NA> <NA> <NA> <NA> R
|
||
#> 45 R <NA> <NA> R R R S <NA> <NA> <NA> R <NA> <NA>
|
||
#> 48 S <NA> S S <NA> S S S <NA> <NA> R <NA> <NA>
|
||
#> 49 <NA> <NA> <NA> R R R S <NA> <NA> <NA> <NA> <NA> R
|
||
#> 50 <NA> <NA> <NA> R R R S <NA> <NA> <NA> <NA> <NA> R
|
||
#> 51 <NA> <NA> <NA> R R R S <NA> <NA> <NA> <NA> <NA> R
|
||
#> 65 <NA> <NA> <NA> R R R S <NA> <NA> <NA> <NA> <NA> R
|
||
#> 66 <NA> <NA> <NA> R R R S <NA> <NA> <NA> <NA> <NA> R
|
||
#> [ reached 'max' / getOption("max.print") -- omitted 942 rows ]</div><div class='input'><span class='va'>example_isolates</span><span class='op'>[</span><span class='fu'><a href='https://rdrr.io/r/base/all.html'>all</a></span><span class='op'>(</span><span class='fu'>carbapenems</span><span class='op'>(</span><span class='op'>)</span><span class='op'>)</span>, <span class='op'>]</span>
|
||
</div><div class='output co'>#> <span class='message'></span><span style='color: #0000BB;'>ℹ Filtering all of columns '</span><span style='color: #0000BB;font-weight: bold;'>IPM</span><span style='color: #0000BB;'>' and '</span><span style='color: #0000BB;font-weight: bold;'>MEM</span><span style='color: #0000BB;'>' to contain value "R", "S" or "I"</span><span></span></div><div class='output co'>#> date hospital_id ward_icu ward_clinical ward_outpatient age gender
|
||
#> 48 2002-04-14 C FALSE FALSE TRUE 73 M
|
||
#> 153 2003-04-08 B TRUE FALSE FALSE 74 M
|
||
#> 154 2003-04-08 B TRUE FALSE FALSE 74 M
|
||
#> 155 2003-04-08 B TRUE FALSE FALSE 74 M
|
||
#> 207 2003-08-14 D FALSE TRUE FALSE 0 F
|
||
#> 237 2003-10-16 B TRUE FALSE FALSE 63 F
|
||
#> 240 2003-10-20 B TRUE FALSE FALSE 52 M
|
||
#> 242 2003-10-20 B TRUE FALSE FALSE 52 M
|
||
#> 246 2003-11-04 B TRUE FALSE FALSE 87 F
|
||
#> 247 2003-11-04 B TRUE FALSE FALSE 87 F
|
||
#> 248 2003-11-04 B TRUE FALSE FALSE 87 F
|
||
#> 251 2003-11-21 B TRUE FALSE FALSE 77 F
|
||
#> 278 2004-02-10 B TRUE FALSE FALSE 71 F
|
||
#> 279 2004-02-10 B TRUE FALSE FALSE 71 F
|
||
#> 280 2004-02-10 B TRUE FALSE FALSE 71 F
|
||
#> 298 2004-03-03 D FALSE TRUE FALSE 74 M
|
||
#> 299 2004-03-03 D FALSE TRUE FALSE 74 M
|
||
#> 309 2004-04-07 C FALSE TRUE FALSE 86 F
|
||
#> 313 2004-04-15 B TRUE FALSE FALSE 87 F
|
||
#> 314 2004-04-15 B TRUE FALSE FALSE 87 F
|
||
#> patient_id mo PEN OXA FLC AMX AMC AMP TZP CZO FEP CXM FOX
|
||
#> 48 F30196 B_STRPT_GRPB S <NA> S S S S S S S S S
|
||
#> 153 114570 B_STRPT_PYGN S <NA> S S S S S S S S S
|
||
#> 154 114570 B_STRPT_GRPA S <NA> S S S S S S S S S
|
||
#> 155 114570 B_STRPT_GRPA S <NA> S S S S S S S S S
|
||
#> 207 F71508 B_STRPT_GRPB S <NA> S S S S S S S S S
|
||
#> 237 650870 B_ESCHR_COLI R <NA> <NA> R R R S <NA> S S S
|
||
#> 240 F35553 B_ENTRBC_CLOC R <NA> <NA> R R R S R S R R
|
||
#> 242 F35553 B_ENTRBC_CLOC R <NA> <NA> R R R S R S R R
|
||
#> 246 2FC253 B_ESCHR_COLI R <NA> <NA> <NA> S <NA> S <NA> S S S
|
||
#> 247 2FC253 B_ESCHR_COLI R <NA> <NA> <NA> S <NA> S <NA> S S S
|
||
#> 248 2FC253 B_ESCHR_COLI R <NA> <NA> <NA> S <NA> S <NA> S S S
|
||
#> 251 550406 B_ESCHR_COLI R <NA> <NA> R R R S <NA> S I R
|
||
#> 278 F24801 B_STRPT_GRPB S <NA> S S S S S S S S S
|
||
#> 279 F24801 B_STRPT_AGLC S <NA> S S S S S S S S S
|
||
#> 280 F24801 B_STRPT_GRPB S <NA> S S S S S S S S S
|
||
#> 298 1435C8 B_ESCHR_COLI R <NA> <NA> S S S S <NA> S S S
|
||
#> 299 1435C8 B_ESCHR_COLI R <NA> <NA> S S S S <NA> S S S
|
||
#> 309 765860 B_STRPT_GRPA S <NA> S S S S S S S S S
|
||
#> 313 386739 B_ESCHR_COLI R <NA> <NA> R I R S <NA> S S S
|
||
#> 314 386739 B_ESCHR_COLI R <NA> <NA> R I R S <NA> S S S
|
||
#> CTX CAZ CRO GEN TOB AMK KAN TMP SXT NIT FOS LNZ CIP MFX VAN TEC
|
||
#> 48 S R S R R R R S S <NA> <NA> <NA> <NA> <NA> S <NA>
|
||
#> 153 S R S R R R R S S <NA> <NA> <NA> <NA> <NA> S <NA>
|
||
#> 154 S R S R R R R S S <NA> <NA> <NA> <NA> <NA> S <NA>
|
||
#> 155 S R S R R R R S S <NA> <NA> <NA> <NA> <NA> S <NA>
|
||
#> 207 S R S R R R R S S <NA> <NA> <NA> <NA> <NA> S <NA>
|
||
#> 237 S S S S S S <NA> <NA> S S <NA> R S <NA> R R
|
||
#> 240 <NA> <NA> <NA> S S S <NA> <NA> S R <NA> R S <NA> R R
|
||
#> 242 <NA> <NA> <NA> S S S <NA> <NA> S R <NA> R S <NA> R R
|
||
#> 246 S S S S S S <NA> <NA> S S <NA> R S <NA> R R
|
||
#> 247 S S S S S S <NA> <NA> S S <NA> R S <NA> R R
|
||
#> 248 S S S S S S <NA> <NA> S S <NA> R S <NA> R R
|
||
#> 251 S S S S S S <NA> <NA> S S <NA> R S <NA> R R
|
||
#> 278 S R S R R R R R <NA> <NA> <NA> <NA> <NA> <NA> S <NA>
|
||
#> 279 S R S R R R R R <NA> <NA> <NA> <NA> <NA> <NA> S <NA>
|
||
#> 280 S R S R R R R R <NA> <NA> <NA> <NA> <NA> <NA> S <NA>
|
||
#> 298 S S S S S S <NA> <NA> S S <NA> R S <NA> R R
|
||
#> 299 S S S S S S <NA> <NA> S S <NA> R S <NA> R R
|
||
#> 309 S R S R R R R S S <NA> <NA> <NA> <NA> <NA> S <NA>
|
||
#> 313 S S S S S S <NA> <NA> S S <NA> R S <NA> R R
|
||
#> 314 S S S S S S <NA> <NA> S S <NA> R S <NA> R R
|
||
#> TCY TGC DOX ERY CLI AZM IPM MEM MTR CHL COL MUP RIF
|
||
#> 48 S <NA> S S <NA> S S S <NA> <NA> R <NA> <NA>
|
||
#> 153 S <NA> S S S S S S <NA> <NA> R <NA> <NA>
|
||
#> 154 S <NA> S S S S S S <NA> <NA> R <NA> <NA>
|
||
#> 155 S <NA> S S S S S S <NA> <NA> R <NA> <NA>
|
||
#> 207 R <NA> <NA> S <NA> S S S <NA> <NA> R <NA> <NA>
|
||
#> 237 <NA> <NA> <NA> R R R S S <NA> <NA> <NA> <NA> R
|
||
#> 240 <NA> <NA> <NA> R R R S S <NA> <NA> <NA> <NA> R
|
||
#> 242 <NA> <NA> <NA> R R R S S <NA> <NA> <NA> <NA> R
|
||
#> 246 <NA> <NA> <NA> R R R S S <NA> <NA> <NA> <NA> R
|
||
#> 247 <NA> <NA> <NA> R R R S S <NA> <NA> <NA> <NA> R
|
||
#> 248 <NA> <NA> <NA> R R R S S <NA> <NA> <NA> <NA> R
|
||
#> 251 <NA> <NA> <NA> R R R S S <NA> <NA> <NA> <NA> R
|
||
#> 278 R <NA> <NA> S <NA> S S S <NA> <NA> R <NA> <NA>
|
||
#> 279 R <NA> <NA> S <NA> S S S <NA> <NA> R <NA> <NA>
|
||
#> 280 R <NA> <NA> S <NA> S S S <NA> <NA> R <NA> <NA>
|
||
#> 298 <NA> <NA> <NA> R R R S S <NA> <NA> <NA> <NA> R
|
||
#> 299 <NA> <NA> <NA> R R R S S <NA> <NA> <NA> <NA> R
|
||
#> 309 R <NA> <NA> S S S S S <NA> <NA> R <NA> <NA>
|
||
#> 313 <NA> <NA> <NA> R R R S S <NA> <NA> <NA> <NA> R
|
||
#> 314 <NA> <NA> <NA> R R R S S <NA> <NA> <NA> <NA> R
|
||
#> [ reached 'max' / getOption("max.print") -- omitted 736 rows ]</div><div class='input'>
|
||
<span class='co'># filter with multiple antibiotic selectors using c()</span>
|
||
<span class='va'>example_isolates</span><span class='op'>[</span><span class='fu'><a href='https://rdrr.io/r/base/all.html'>all</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fu'>carbapenems</span><span class='op'>(</span><span class='op'>)</span>, <span class='fu'>aminoglycosides</span><span class='op'>(</span><span class='op'>)</span><span class='op'>)</span> <span class='op'>==</span> <span class='st'>"R"</span><span class='op'>)</span>, <span class='op'>]</span>
|
||
</div><div class='output co'>#> <span class='message'></span><span style='color: #0000BB;'>ℹ Assuming a filter on all 6 carbapenems, aminoglycosides. Wrap around</span>
|
||
#> <span class='message'> </span><span style='color: #0000BB;background-color: #E4E4E4;'>`all()`</span><span style='color: #0000BB;'> or </span><span style='color: #0000BB;background-color: #E4E4E4;'>`any()`</span><span style='color: #0000BB;'> to prevent this note.</span><span></span></div><div class='output co'>#> date hospital_id ward_icu ward_clinical ward_outpatient age gender
|
||
#> 381 2004-11-03 B TRUE FALSE FALSE 80 F
|
||
#> 463 2005-04-22 B TRUE FALSE FALSE 82 F
|
||
#> 698 2007-02-21 D FALSE TRUE FALSE 61 F
|
||
#> 799 2007-12-15 A FALSE TRUE FALSE 72 M
|
||
#> 918 2008-12-06 D FALSE TRUE FALSE 43 F
|
||
#> 1172 2011-05-09 D TRUE TRUE FALSE 82 F
|
||
#> 1262 2012-03-12 B TRUE TRUE FALSE 80 M
|
||
#> 1281 2012-05-19 A FALSE FALSE TRUE 89 F
|
||
#> 1302 2012-07-17 D TRUE TRUE FALSE 83 M
|
||
#> 1307 2012-07-20 D FALSE TRUE FALSE 66 F
|
||
#> 1308 2012-07-20 D FALSE TRUE FALSE 66 F
|
||
#> 1324 2012-09-18 D FALSE TRUE FALSE 62 M
|
||
#> 1328 2012-10-04 D FALSE TRUE FALSE 62 M
|
||
#> 1334 2012-10-18 D TRUE TRUE FALSE 65 F
|
||
#> 1449 2014-01-14 B FALSE TRUE FALSE 81 M
|
||
#> 1450 2014-01-14 B FALSE TRUE FALSE 81 M
|
||
#> 1624 2015-10-06 B TRUE TRUE FALSE 79 F
|
||
#> 1625 2015-10-07 B TRUE TRUE FALSE 79 F
|
||
#> 1626 2015-10-07 B TRUE TRUE FALSE 79 F
|
||
#> 1690 2016-03-27 D FALSE TRUE FALSE 47 M
|
||
#> patient_id mo PEN OXA FLC AMX AMC AMP TZP CZO FEP CXM FOX
|
||
#> 381 D65308 B_STNTR_MLTP R <NA> <NA> R R R R R <NA> R R
|
||
#> 463 452212 B_ENTRC_FACM <NA> <NA> <NA> <NA> <NA> <NA> R R R R R
|
||
#> 698 8BBC46 B_ENTRC_FACM <NA> <NA> <NA> <NA> <NA> <NA> R R R R R
|
||
#> 799 401043 B_ENTRC_FACM <NA> <NA> <NA> <NA> <NA> <NA> R R R R R
|
||
#> 918 501361 B_STNTR_MLTP R <NA> <NA> R R R R R <NA> R R
|
||
#> 1172 207325 B_ENTRC_FACM <NA> <NA> <NA> <NA> <NA> <NA> R R R R R
|
||
#> 1262 582258 B_STPHY_CONS R R R R R R R R R R R
|
||
#> 1281 C25552 B_STPHY_CONS R R R R R R R R R R R
|
||
#> 1302 F05015 B_STPHY_CONS R R R R R R R R R R R
|
||
#> 1307 404299 B_STPHY_CONS R R R R R R R R R R R
|
||
#> 1308 404299 B_STPHY_CONS R R R R R R R R R R R
|
||
#> 1324 431647 B_STPHY_CONS R R R R R R R R R R R
|
||
#> 1328 431647 B_STPHY_CONS R R R R R R R R R R R
|
||
#> 1334 E4F322 B_ENTRC_FACM R R R R R R R R R R R
|
||
#> 1449 8F77B2 B_ENTRC_FACM R R R R R R R R R R R
|
||
#> 1450 8F77B2 B_ENTRC_FACM R R R R R R R R R R R
|
||
#> 1624 A76045 B_ENTRC_FACM R R R R R R R R R R R
|
||
#> 1625 A76045 B_ENTRC_FACM R R R R R R R R R R R
|
||
#> 1626 A76045 B_ENTRC_FACM R R R R R R R R R R R
|
||
#> 1690 960787 B_ENTRC_FACM R R R R R R R R R R R
|
||
#> CTX CAZ CRO GEN TOB AMK KAN TMP SXT NIT FOS LNZ CIP MFX VAN TEC
|
||
#> 381 R R R R R R R R S <NA> R R <NA> <NA> R R
|
||
#> 463 R R R R R R R R R <NA> <NA> <NA> <NA> <NA> S <NA>
|
||
#> 698 R R R R R R R R R <NA> <NA> <NA> <NA> <NA> S <NA>
|
||
#> 799 R R R R R R R R R <NA> <NA> <NA> R <NA> S <NA>
|
||
#> 918 R R R R R R R R S R R R S <NA> R R
|
||
#> 1172 R R R R R R R R R <NA> <NA> <NA> <NA> <NA> S <NA>
|
||
#> 1262 R R R R R R R R <NA> <NA> <NA> <NA> S <NA> S <NA>
|
||
#> 1281 R R R R R R R R R <NA> <NA> <NA> R <NA> S <NA>
|
||
#> 1302 R R R R R R R S S <NA> <NA> <NA> S <NA> S <NA>
|
||
#> 1307 R R R R R R R R S <NA> <NA> <NA> S <NA> <NA> <NA>
|
||
#> 1308 R R R R R R R R R <NA> <NA> <NA> R <NA> S <NA>
|
||
#> 1324 R R R R R R R R R <NA> <NA> <NA> R <NA> S <NA>
|
||
#> 1328 R R R R R R R R R S <NA> <NA> R <NA> <NA> <NA>
|
||
#> 1334 R R R R R R R R R S <NA> S <NA> <NA> S <NA>
|
||
#> 1449 R R R R R R R R R S <NA> S <NA> <NA> S S
|
||
#> 1450 R R R R R R R R R S <NA> S <NA> <NA> S S
|
||
#> 1624 R R R R R R R R R S <NA> S <NA> <NA> S S
|
||
#> 1625 R R R R R R R R R S <NA> S <NA> <NA> S S
|
||
#> 1626 R R R R R R R R R S <NA> S <NA> <NA> S S
|
||
#> 1690 R R R R R R R R R S <NA> S <NA> <NA> S S
|
||
#> TCY TGC DOX ERY CLI AZM IPM MEM MTR CHL COL MUP RIF
|
||
#> 381 R <NA> R R R R R R <NA> <NA> R <NA> R
|
||
#> 463 R <NA> <NA> R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 698 S <NA> <NA> R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 799 S <NA> <NA> R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 918 R <NA> R R R R R R <NA> <NA> R <NA> R
|
||
#> 1172 <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1262 <NA> <NA> S R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1281 <NA> <NA> <NA> R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1302 <NA> <NA> R R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1307 <NA> <NA> R R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1308 <NA> <NA> S R S R R R <NA> <NA> R <NA> <NA>
|
||
#> 1324 <NA> <NA> R R S R R R <NA> <NA> R <NA> <NA>
|
||
#> 1328 R <NA> R R R R R R <NA> <NA> R S S
|
||
#> 1334 <NA> <NA> <NA> R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1449 <NA> S <NA> R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1450 <NA> S <NA> R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1624 <NA> S <NA> R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1625 <NA> S <NA> R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1626 <NA> S <NA> R R R R R <NA> <NA> R <NA> <NA>
|
||
#> 1690 <NA> S <NA> R R R R R <NA> <NA> R <NA> <NA>
|
||
#> [ reached 'max' / getOption("max.print") -- omitted 6 rows ]</div><div class='input'>
|
||
<span class='co'># filter + select in one go: get penicillins in carbapenems-resistant strains</span>
|
||
<span class='va'>example_isolates</span><span class='op'>[</span><span class='fu'><a href='https://rdrr.io/r/base/any.html'>any</a></span><span class='op'>(</span><span class='fu'>carbapenems</span><span class='op'>(</span><span class='op'>)</span> <span class='op'>==</span> <span class='st'>"R"</span><span class='op'>)</span>, <span class='fu'>penicillins</span><span class='op'>(</span><span class='op'>)</span><span class='op'>]</span>
|
||
</div><div class='output co'>#> <span class='message'></span><span style='color: #0000BB;'>ℹ For </span><span style='color: #0000BB;background-color: #E4E4E4;'>`penicillins()`</span><span style='color: #0000BB;'> using columns: '</span><span style='color: #0000BB;font-weight: bold;'>AMC</span><span style='color: #0000BB;'>' (amoxicillin/clavulanic acid),</span>
|
||
#> <span class='message'> '</span><span style='color: #0000BB;font-weight: bold;'>AMP</span><span style='color: #0000BB;'>' (ampicillin), '</span><span style='color: #0000BB;font-weight: bold;'>AMX</span><span style='color: #0000BB;'>' (amoxicillin), '</span><span style='color: #0000BB;font-weight: bold;'>FLC</span><span style='color: #0000BB;'>' (flucloxacillin), '</span><span style='color: #0000BB;font-weight: bold;'>OXA</span><span style='color: #0000BB;'>'</span>
|
||
#> <span class='message'> (oxacillin), '</span><span style='color: #0000BB;font-weight: bold;'>PEN</span><span style='color: #0000BB;'>' (benzylpenicillin) and '</span><span style='color: #0000BB;font-weight: bold;'>TZP</span><span style='color: #0000BB;'>' (piperacillin/tazobactam)</span><span></span></div><div class='output co'>#> <span class='message'></span><span style='color: #0000BB;'>ℹ Assuming a filter on all 2 carbapenems. Wrap around </span><span style='color: #0000BB;background-color: #E4E4E4;'>`all()`</span><span style='color: #0000BB;'> or </span><span style='color: #0000BB;background-color: #E4E4E4;'>`any()`</span><span style='color: #0000BB;'> to</span>
|
||
#> <span class='message'> prevent this note.</span><span></span></div><div class='output co'>#> PEN OXA FLC AMX AMC AMP TZP
|
||
#> 381 R <NA> <NA> R R R R
|
||
#> 461 <NA> <NA> <NA> <NA> <NA> <NA> R
|
||
#> 462 <NA> <NA> <NA> <NA> <NA> <NA> R
|
||
#> 463 <NA> <NA> <NA> <NA> <NA> <NA> R
|
||
#> 698 <NA> <NA> <NA> <NA> <NA> <NA> R
|
||
#> 799 <NA> <NA> <NA> <NA> <NA> <NA> R
|
||
#> 918 R <NA> <NA> R R R R
|
||
#> 1147 R R R R R R R
|
||
#> 1149 R R R R R R R
|
||
#> 1156 R R R R R R R
|
||
#> 1157 R R R R R R R
|
||
#> 1172 <NA> <NA> <NA> <NA> <NA> <NA> R
|
||
#> 1210 R R R R R R R
|
||
#> 1213 R R R R R R R
|
||
#> 1217 R R R R R R R
|
||
#> 1218 R R R R R R R
|
||
#> 1242 R R R R R R R
|
||
#> 1243 R R R R R R R
|
||
#> 1246 R R R R R R R
|
||
#> 1259 R R R R R R R
|
||
#> 1260 R R R R R R R
|
||
#> 1262 R R R R R R R
|
||
#> 1268 R R R R R R R
|
||
#> 1269 R R R R R R R
|
||
#> 1281 R R R R R R R
|
||
#> 1302 R R R R R R R
|
||
#> 1307 R R R R R R R
|
||
#> 1308 R R R R R R R
|
||
#> 1311 R R R R R R R
|
||
#> 1315 R R R R R R R
|
||
#> 1321 R R R R R R R
|
||
#> 1324 R R R R R R R
|
||
#> 1326 R R R R R R R
|
||
#> 1328 R R R R R R R
|
||
#> 1334 R R R R R R R
|
||
#> 1346 <NA> <NA> <NA> R R R R
|
||
#> 1449 R R R R R R R
|
||
#> 1450 R R R R R R R
|
||
#> 1624 R R R R R R R
|
||
#> 1625 R R R R R R R
|
||
#> 1626 R R R R R R R
|
||
#> 1690 R R R R R R R
|
||
#> 1693 R R R R R R R
|
||
#> 1696 R R R R R R R
|
||
#> 1723 R R R R R R R
|
||
#> 1906 R R R R R R R
|
||
#> 1908 R R R R R R R
|
||
#> 1929 R R R R R R R
|
||
#> 1945 R R R R R R R</div><div class='input'>
|
||
|
||
<span class='co'># dplyr -------------------------------------------------------------------</span>
|
||
<span class='co'># \donttest{</span>
|
||
<span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='st'><a href='https://dplyr.tidyverse.org'>"dplyr"</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span>
|
||
|
||
<span class='co'># get AMR for all aminoglycosides e.g., per hospital:</span>
|
||
<span class='va'>example_isolates</span> <span class='op'>%>%</span>
|
||
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/group_by.html'>group_by</a></span><span class='op'>(</span><span class='va'>hospital_id</span><span class='op'>)</span> <span class='op'>%>%</span>
|
||
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/summarise.html'>summarise</a></span><span class='op'>(</span><span class='fu'><a href='https://dplyr.tidyverse.org/reference/across.html'>across</a></span><span class='op'>(</span><span class='fu'>aminoglycosides</span><span class='op'>(</span><span class='op'>)</span>, <span class='va'>resistance</span><span class='op'>)</span><span class='op'>)</span>
|
||
|
||
<span class='co'># this will select columns 'IPM' (imipenem) and 'MEM' (meropenem):</span>
|
||
<span class='va'>example_isolates</span> <span class='op'>%>%</span>
|
||
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/select.html'>select</a></span><span class='op'>(</span><span class='fu'>carbapenems</span><span class='op'>(</span><span class='op'>)</span><span class='op'>)</span>
|
||
|
||
<span class='co'># this will select columns 'mo', 'AMK', 'GEN', 'KAN' and 'TOB':</span>
|
||
<span class='va'>example_isolates</span> <span class='op'>%>%</span>
|
||
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/select.html'>select</a></span><span class='op'>(</span><span class='va'>mo</span>, <span class='fu'>aminoglycosides</span><span class='op'>(</span><span class='op'>)</span><span class='op'>)</span>
|
||
|
||
<span class='co'># any() and all() work in dplyr's filter() too:</span>
|
||
<span class='va'>example_isolates</span> <span class='op'>%>%</span>
|
||
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/filter.html'>filter</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/any.html'>any</a></span><span class='op'>(</span><span class='fu'>aminoglycosides</span><span class='op'>(</span><span class='op'>)</span> <span class='op'>==</span> <span class='st'>"R"</span><span class='op'>)</span>,
|
||
<span class='fu'><a href='https://rdrr.io/r/base/all.html'>all</a></span><span class='op'>(</span><span class='fu'>cephalosporins_2nd</span><span class='op'>(</span><span class='op'>)</span> <span class='op'>==</span> <span class='st'>"R"</span><span class='op'>)</span><span class='op'>)</span>
|
||
|
||
<span class='co'># also works with c():</span>
|
||
<span class='va'>example_isolates</span> <span class='op'>%>%</span>
|
||
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/filter.html'>filter</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/any.html'>any</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fu'>carbapenems</span><span class='op'>(</span><span class='op'>)</span>, <span class='fu'>aminoglycosides</span><span class='op'>(</span><span class='op'>)</span><span class='op'>)</span> <span class='op'>==</span> <span class='st'>"R"</span><span class='op'>)</span><span class='op'>)</span>
|
||
|
||
<span class='co'># not setting any/all will automatically apply all():</span>
|
||
<span class='va'>example_isolates</span> <span class='op'>%>%</span>
|
||
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/filter.html'>filter</a></span><span class='op'>(</span><span class='fu'>aminoglycosides</span><span class='op'>(</span><span class='op'>)</span> <span class='op'>==</span> <span class='st'>"R"</span><span class='op'>)</span>
|
||
<span class='co'>#> i Assuming a filter on all 4 aminoglycosides.</span>
|
||
|
||
<span class='co'># this will select columns 'mo' and all antimycobacterial drugs ('RIF'):</span>
|
||
<span class='va'>example_isolates</span> <span class='op'>%>%</span>
|
||
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/select.html'>select</a></span><span class='op'>(</span><span class='va'>mo</span>, <span class='fu'>ab_class</span><span class='op'>(</span><span class='st'>"mycobact"</span><span class='op'>)</span><span class='op'>)</span>
|
||
|
||
|
||
<span class='co'># get bug/drug combinations for only macrolides in Gram-positives:</span>
|
||
<span class='va'>example_isolates</span> <span class='op'>%>%</span>
|
||
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/filter.html'>filter</a></span><span class='op'>(</span><span class='fu'><a href='mo_property.html'>mo_is_gram_positive</a></span><span class='op'>(</span><span class='op'>)</span><span class='op'>)</span> <span class='op'>%>%</span>
|
||
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/select.html'>select</a></span><span class='op'>(</span><span class='va'>mo</span>, <span class='fu'>macrolides</span><span class='op'>(</span><span class='op'>)</span><span class='op'>)</span> <span class='op'>%>%</span>
|
||
<span class='fu'><a href='bug_drug_combinations.html'>bug_drug_combinations</a></span><span class='op'>(</span><span class='op'>)</span> <span class='op'>%>%</span>
|
||
<span class='fu'><a href='https://rdrr.io/r/base/format.html'>format</a></span><span class='op'>(</span><span class='op'>)</span>
|
||
|
||
|
||
<span class='fu'><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></span><span class='op'>(</span>some_column <span class='op'>=</span> <span class='st'>"some_value"</span>,
|
||
J01CA01 <span class='op'>=</span> <span class='st'>"S"</span><span class='op'>)</span> <span class='op'>%>%</span> <span class='co'># ATC code of ampicillin</span>
|
||
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/select.html'>select</a></span><span class='op'>(</span><span class='fu'>penicillins</span><span class='op'>(</span><span class='op'>)</span><span class='op'>)</span> <span class='co'># only the 'J01CA01' column will be selected</span>
|
||
|
||
|
||
<span class='co'># with dplyr 1.0.0 and higher (that adds 'across()'), this is all equal:</span>
|
||
<span class='co'># (though the row names on the first are more correct)</span>
|
||
<span class='va'>example_isolates</span><span class='op'>[</span><span class='fu'>carbapenems</span><span class='op'>(</span><span class='op'>)</span> <span class='op'>==</span> <span class='st'>"R"</span>, <span class='op'>]</span>
|
||
<span class='va'>example_isolates</span> <span class='op'>%>%</span> <span class='fu'><a href='https://dplyr.tidyverse.org/reference/filter.html'>filter</a></span><span class='op'>(</span><span class='fu'>carbapenems</span><span class='op'>(</span><span class='op'>)</span> <span class='op'>==</span> <span class='st'>"R"</span><span class='op'>)</span>
|
||
<span class='va'>example_isolates</span> <span class='op'>%>%</span> <span class='fu'><a href='https://dplyr.tidyverse.org/reference/filter.html'>filter</a></span><span class='op'>(</span><span class='fu'><a href='https://dplyr.tidyverse.org/reference/across.html'>across</a></span><span class='op'>(</span><span class='fu'>carbapenems</span><span class='op'>(</span><span class='op'>)</span>, <span class='op'>~</span><span class='va'>.x</span> <span class='op'>==</span> <span class='st'>"R"</span><span class='op'>)</span><span class='op'>)</span>
|
||
<span class='op'>}</span>
|
||
</div><div class='output co'>#> <span class='error'>Error: </span></div><div class='input'><span class='co'># }</span>
|
||
</div></span></pre>
|
||
</div>
|
||
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
|
||
<nav id="toc" data-toggle="toc" class="sticky-top">
|
||
<h2 data-toc-skip>Contents</h2>
|
||
</nav>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<footer>
|
||
<div class="copyright">
|
||
<p>Developed by <a href='https://www.rug.nl/staff/m.s.berends/'>Matthijs S. Berends</a>, <a href='https://www.rug.nl/staff/c.f.luz/'>Christian F. Luz</a>, <a href='https://www.rug.nl/staff/a.w.friedrich/'>Alexander W. Friedrich</a>, <a href='https://www.rug.nl/staff/b.sinha/'>Bhanu N. M. Sinha</a>, <a href='https://www.rug.nl/staff/c.j.albers/'>Casper J. Albers</a>, <a href='https://www.rug.nl/staff/c.glasner/'>Corinna Glasner</a>.</p>
|
||
</div>
|
||
|
||
<div class="pkgdown">
|
||
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p>
|
||
</div>
|
||
|
||
</footer>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
</body>
|
||
</html>
|
||
|
||
|