@ -12,7 +12,7 @@ In short, if you have a column name that resembles an antimicrobial drug, it wil
< a class = "navbar-brand me-2" href = "../index.html" > AMR (for R)< / a >
< small class = "nav-text text-muted me-auto" data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = "" > 2.1.1.9051 < / small >
< small class = "nav-text text-muted me-auto" data-bs-toggle = "tooltip" data-bs-placement = "bottom" title = "" > 2.1.1.9052 < / small >
< button class = "navbar-toggler" type = "button" data-bs-toggle = "collapse" data-bs-target = "#navbar" aria-controls = "navbar" aria-expanded = "false" aria-label = "Toggle navigation" >
@ -326,7 +326,844 @@ In short, if you have a column name that resembles an antimicrobial drug, it wil
< div class = "section level2" >
< h2 id = "ref-examples" > Examples< a class = "anchor" aria-label = "anchor" href = "#ref-examples" > < / a > < / h2 >
< div class = "sourceCode" > < pre class = "sourceCode r" > < code > < span class = "r-in" > < span > < span class = "co" > # `example_isolates` is a data set available in the AMR package.< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # See ?example_isolates.< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > example_isolates< / span > < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 2,000 × 46< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > date patient age gender ward mo PEN OXA FLC AMX < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < date> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < mo> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > 2002-01-02 A77334 65 F Clinical B_ESCHR_COLI R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > 2002-01-03 A77334 65 F Clinical B_ESCHR_COLI R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > 2002-01-07 067927 45 F ICU B_STPHY_EPDR R NA R NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 4< / span > 2002-01-07 067927 45 F ICU B_STPHY_EPDR R NA R NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 5< / span > 2002-01-13 067927 45 F ICU B_STPHY_EPDR R NA R NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 6< / span > 2002-01-13 067927 45 F ICU B_STPHY_EPDR R NA R NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 7< / span > 2002-01-14 462729 78 M Clinical B_STPHY_AURS R NA S R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 8< / span > 2002-01-14 462729 78 M Clinical B_STPHY_AURS R NA S R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 9< / span > 2002-01-16 067927 45 F ICU B_STPHY_EPDR R NA R NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 10< / span > 2002-01-17 858515 79 F ICU B_STPHY_EPDR R NA S NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 1,990 more rows< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 36 more variables: AMC < sir> , AMP < sir> , TZP < sir> , CZO < sir> , FEP < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # CXM < sir> , FOX < sir> , CTX < sir> , CAZ < sir> , CRO < sir> , GEN < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # TOB < sir> , AMK < sir> , KAN < sir> , TMP < sir> , SXT < sir> , NIT < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # FOS < sir> , LNZ < sir> , CIP < sir> , MFX < sir> , VAN < sir> , TEC < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # TCY < sir> , TGC < sir> , DOX < sir> , ERY < sir> , CLI < sir> , AZM < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # IPM < sir> , MEM < sir> , MTR < sir> , CHL < sir> , COL < sir> , MUP < sir> , …< / span > < / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # Examples sections below are split into 'dplyr', 'base R', and 'data.table':< / span > < / span > < / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # \donttest{< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # dplyr -------------------------------------------------------------------< / span > < / span > < / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < span class = "kw" > if< / span > < span class = "op" > (< / span > < span class = "kw" > < a href = "https://rdrr.io/r/base/library.html" class = "external-link" > require< / a > < / span > < span class = "op" > (< / span > < span class = "st" > < a href = "https://dplyr.tidyverse.org" class = "external-link" > "dplyr"< / a > < / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > {< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > example_isolates< / span > < span class = "op" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/select.html" class = "external-link" > 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 > < / span >
< span class = "r-in" > < span > < span class = "op" > }< / span > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 2,000 × 2< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > IPM MEM < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 4< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 5< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 6< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 7< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 8< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 9< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 10< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 1,990 more rows< / span > < / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < span class = "kw" > if< / span > < span class = "op" > (< / span > < span class = "kw" > < a href = "https://rdrr.io/r/base/library.html" class = "external-link" > require< / a > < / span > < span class = "op" > (< / span > < span class = "st" > < a href = "https://dplyr.tidyverse.org" class = "external-link" > "dplyr"< / a > < / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > {< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # select columns 'mo', 'AMK', 'GEN', 'KAN' and 'TOB'< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > example_isolates< / span > < span class = "op" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/select.html" class = "external-link" > 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 > < / span >
< span class = "r-in" > < span > < span class = "op" > }< / span > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 2,000 × 5< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > mo GEN TOB AMK KAN < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < mo> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > B_ESCHR_COLI NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > B_ESCHR_COLI NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > B_STPHY_EPDR NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 4< / span > B_STPHY_EPDR NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 5< / span > B_STPHY_EPDR NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 6< / span > B_STPHY_EPDR NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 7< / span > B_STPHY_AURS NA S NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 8< / span > B_STPHY_AURS NA S NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 9< / span > B_STPHY_EPDR NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 10< / span > B_STPHY_EPDR NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 1,990 more rows< / span > < / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < span class = "kw" > if< / span > < span class = "op" > (< / span > < span class = "kw" > < a href = "https://rdrr.io/r/base/library.html" class = "external-link" > require< / a > < / span > < span class = "op" > (< / span > < span class = "st" > < a href = "https://dplyr.tidyverse.org" class = "external-link" > "dplyr"< / a > < / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > {< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # select only antibiotic columns with DDDs for oral treatment< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > example_isolates< / span > < span class = "op" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/select.html" class = "external-link" > select< / a > < / span > < span class = "op" > (< / span > < span class = "fu" > administrable_per_os< / span > < span class = "op" > (< / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "op" > }< / span > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For administrable_per_os() using columns 'OXA' (oxacillin), 'FLC'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (flucloxacillin), 'AMX' (amoxicillin), 'AMC' (amoxicillin/clavulanic acid),< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > 'AMP' (ampicillin), 'CXM' (cefuroxime), 'KAN' (kanamycin), 'TMP'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (trimethoprim), 'NIT' (nitrofurantoin), 'FOS' (fosfomycin), 'LNZ'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (linezolid), 'CIP' (ciprofloxacin), 'MFX' (moxifloxacin), 'VAN'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (vancomycin), 'TCY' (tetracycline), 'DOX' (doxycycline), 'ERY'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (erythromycin), 'CLI' (clindamycin), 'AZM' (azithromycin), 'MTR'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (metronidazole), 'CHL' (chloramphenicol), 'COL' (colistin), and 'RIF'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (rifampicin)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 2,000 × 23< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > OXA FLC AMX AMC AMP CXM KAN TMP NIT FOS LNZ CIP MFX < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > NA NA NA I NA I NA R NA NA R NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > NA NA NA I NA I NA R NA NA R NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > NA R NA NA NA R NA S NA NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 4< / span > NA R NA NA NA R NA S NA NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 5< / span > NA R NA NA NA R NA R NA NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 6< / span > NA R NA NA NA R NA R NA NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 7< / span > NA S R S R S NA R NA NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 8< / span > NA S R S R S NA R NA NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 9< / span > NA R NA NA NA R NA S NA NA NA S NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 10< / span > NA S NA NA NA S NA S NA NA NA S NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 1,990 more rows< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 10 more variables: VAN < sir> , TCY < sir> , DOX < sir> , ERY < sir> , CLI < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # AZM < sir> , MTR < sir> , CHL < sir> , COL < sir> , RIF < sir> < / span > < / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < span class = "kw" > if< / span > < span class = "op" > (< / span > < span class = "kw" > < a href = "https://rdrr.io/r/base/library.html" class = "external-link" > require< / a > < / span > < span class = "op" > (< / span > < span class = "st" > < a href = "https://dplyr.tidyverse.org" class = "external-link" > "dplyr"< / a > < / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > {< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # get AMR for all aminoglycosides e.g., per ward:< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > example_isolates< / span > < span class = "op" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/group_by.html" class = "external-link" > group_by< / a > < / span > < span class = "op" > (< / span > < span class = "va" > ward< / span > < span class = "op" > )< / span > < span class = "op" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/summarise.html" class = "external-link" > summarise< / a > < / span > < span class = "op" > (< / span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/across.html" class = "external-link" > across< / a > < / span > < span class = "op" > (< / span > < span class = "fu" > aminoglycosides< / span > < span class = "op" > (< / span > < span class = "op" > )< / span > ,< / span > < / span >
< span class = "r-in" > < span > < span class = "va" > resistance< / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "op" > }< / span > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)< / span >
< span class = "r-wrn co" > < span class = "r-pr" > #> < / span > < span class = "warning" > Warning: < / span > There was 1 warning in `summarise()`.< / span >
< span class = "r-wrn co" > < span class = "r-pr" > #> < / span > < span style = "color: #00BBBB;" > ℹ < / span > In argument: `across(aminoglycosides(), resistance)`.< / span >
< span class = "r-wrn co" > < span class = "r-pr" > #> < / span > < span style = "color: #00BBBB;" > ℹ < / span > In group 3: `ward = "Outpatient"`.< / span >
< span class = "r-wrn co" > < span class = "r-pr" > #> < / span > Caused by warning:< / span >
< span class = "r-wrn co" > < span class = "r-pr" > #> < / span > < span style = "color: #BBBB00;" > !< / span > Introducing NA: only 23 results available for KAN in group: ward =< / span >
< span class = "r-wrn co" > < span class = "r-pr" > #> < / span > "Outpatient" (minimum = 30).< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 3 × 5< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > ward GEN TOB AMK KAN< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > Clinical 0.229 0.315 0.626 1< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > ICU 0.290 0.400 0.662 1< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > Outpatient 0.2 0.368 0.605 < span style = "color: #BB0000;" > NA< / span > < / span >
< span class = "r-in" > < span > < span class = "kw" > if< / span > < span class = "op" > (< / span > < span class = "kw" > < a href = "https://rdrr.io/r/base/library.html" class = "external-link" > require< / a > < / span > < span class = "op" > (< / span > < span class = "st" > < a href = "https://dplyr.tidyverse.org" class = "external-link" > "dplyr"< / a > < / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > {< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # You can combine selectors with '& ' to be more specific:< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > example_isolates< / span > < span class = "op" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/select.html" class = "external-link" > 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 = "fu" > administrable_per_os< / span > < span class = "op" > (< / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "op" > }< / span > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For penicillins() using columns 'PEN' (benzylpenicillin), 'OXA'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (oxacillin), 'FLC' (flucloxacillin), 'AMX' (amoxicillin), 'AMC'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (amoxicillin/clavulanic acid), 'AMP' (ampicillin), and 'TZP'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (piperacillin/tazobactam)< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For administrable_per_os() using columns 'OXA' (oxacillin), 'FLC'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (flucloxacillin), 'AMX' (amoxicillin), 'AMC' (amoxicillin/clavulanic acid),< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > 'AMP' (ampicillin), 'CXM' (cefuroxime), 'KAN' (kanamycin), 'TMP'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (trimethoprim), 'NIT' (nitrofurantoin), 'FOS' (fosfomycin), 'LNZ'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (linezolid), 'CIP' (ciprofloxacin), 'MFX' (moxifloxacin), 'VAN'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (vancomycin), 'TCY' (tetracycline), 'DOX' (doxycycline), 'ERY'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (erythromycin), 'CLI' (clindamycin), 'AZM' (azithromycin), 'MTR'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (metronidazole), 'CHL' (chloramphenicol), 'COL' (colistin), and 'RIF'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (rifampicin)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 2,000 × 5< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > OXA FLC AMX AMC AMP < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > NA NA NA I NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > NA NA NA I NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > NA R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 4< / span > NA R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 5< / span > NA R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 6< / span > NA R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 7< / span > NA S R S R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 8< / span > NA S R S R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 9< / span > NA R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 10< / span > NA S NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 1,990 more rows< / span > < / span >
< span class = "r-in" > < span > < span class = "kw" > if< / span > < span class = "op" > (< / span > < span class = "kw" > < a href = "https://rdrr.io/r/base/library.html" class = "external-link" > require< / a > < / span > < span class = "op" > (< / span > < span class = "st" > < a href = "https://dplyr.tidyverse.org" class = "external-link" > "dplyr"< / a > < / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > {< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # get AMR for only drugs that matter - no intrinsic resistance:< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > example_isolates< / span > < span class = "op" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/filter.html" class = "external-link" > filter< / a > < / span > < span class = "op" > (< / span > < span class = "fu" > < a href = "mo_property.html" > mo_genus< / a > < / span > < span class = "op" > (< / span > < span class = "op" > )< / span > < span class = "op" > < a href = "https://rdrr.io/r/base/match.html" class = "external-link" > %in%< / a > < / span > < span class = "fu" > < a href = "https://rdrr.io/r/base/c.html" class = "external-link" > c< / a > < / span > < span class = "op" > (< / span > < span class = "st" > "Escherichia"< / span > , < span class = "st" > "Klebsiella"< / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/group_by.html" class = "external-link" > group_by< / a > < / span > < span class = "op" > (< / span > < span class = "va" > ward< / span > < span class = "op" > )< / span > < span class = "op" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/summarise_all.html" class = "external-link" > summarise_at< / a > < / span > < span class = "op" > (< / span > < span class = "fu" > not_intrinsic_resistant< / span > < span class = "op" > (< / span > < span class = "op" > )< / span > ,< / span > < / span >
< span class = "r-in" > < span > < span class = "va" > resistance< / span > < span class = "op" > )< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "op" > }< / span > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ Using column 'mo' as input for mo_genus()< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For not_intrinsic_resistant() removing columns 'PEN'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (benzylpenicillin), 'LNZ' (linezolid), 'VAN' (vancomycin), 'TEC'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (teicoplanin), 'ERY' (erythromycin), 'CLI' (clindamycin), 'AZM'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (azithromycin), and 'RIF' (rifampicin)< / span >
< span class = "r-wrn co" > < span class = "r-pr" > #> < / span > < span class = "warning" > Warning: < / span > There were 52 warnings in `summarise()`.< / span >
< span class = "r-wrn co" > < span class = "r-pr" > #> < / span > The first warning was:< / span >
< span class = "r-wrn co" > < span class = "r-pr" > #> < / span > < span style = "color: #00BBBB;" > ℹ < / span > In argument: `OXA = (function (..., minimum = 30, as_percent = FALSE,< / span >
< span class = "r-wrn co" > < span class = "r-pr" > #> < / span > only_all_tested = FALSE) ...`.< / span >
< span class = "r-wrn co" > < span class = "r-pr" > #> < / span > < span style = "color: #00BBBB;" > ℹ < / span > In group 1: `ward = "Clinical"`.< / span >
< span class = "r-wrn co" > < span class = "r-pr" > #> < / span > Caused by warning:< / span >
< span class = "r-wrn co" > < span class = "r-pr" > #> < / span > < span style = "color: #BBBB00;" > !< / span > Introducing NA: no results available for OXA in group: ward = "Clinical"< / span >
< span class = "r-wrn co" > < span class = "r-pr" > #> < / span > (minimum = 30).< / span >
< span class = "r-wrn co" > < span class = "r-pr" > #> < / span > < span style = "color: #00BBBB;" > ℹ < / span > Run `dplyr::last_dplyr_warnings()` to see the 51 remaining warnings.< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 3 × 33< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > ward OXA FLC AMX AMC AMP TZP CZO FEP CXM FOX< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > Clin… < span style = "color: #BB0000;" > NA< / span > < span style = "color: #BB0000;" > NA< / span > 0.606 0.121 0.606 0.050< span style = "text-decoration: underline;" > 4< / span > 0.065< span style = "text-decoration: underline;" > 6< / span > 0.015< span style = "text-decoration: underline;" > 9< / span > 0.062< span style = "text-decoration: underline;" > 2< / span > 0.064< span style = "text-decoration: underline;" > 8< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > ICU < span style = "color: #BB0000;" > NA< / span > < span style = "color: #BB0000;" > NA< / span > 0.535 0.172 0.535 0.119 < span style = "color: #BB0000;" > NA< / span > 0.072< span style = "text-decoration: underline;" > 2< / span > 0.082< span style = "text-decoration: underline;" > 8< / span > 0.099< span style = "text-decoration: underline;" > 2< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > Outp… < span style = "color: #BB0000;" > NA< / span > < span style = "color: #BB0000;" > NA< / span > < span style = "color: #BB0000;" > NA< / span > < span style = "color: #BB0000;" > NA< / span > < span style = "color: #BB0000;" > NA< / span > < span style = "color: #BB0000;" > NA< / span > < span style = "color: #BB0000;" > NA< / span > < span style = "color: #BB0000;" > NA< / span > < span style = "color: #BB0000;" > NA< / span > < span style = "color: #BB0000;" > NA< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 22 more variables: CTX < dbl> , CAZ < dbl> , CRO < dbl> , GEN < dbl> , TOB < dbl> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # AMK < dbl> , KAN < dbl> , TMP < dbl> , SXT < dbl> , NIT < dbl> , FOS < dbl> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # CIP < dbl> , MFX < dbl> , TCY < dbl> , TGC < dbl> , DOX < dbl> , IPM < dbl> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # MEM < dbl> , MTR < dbl> , CHL < dbl> , COL < dbl> , MUP < dbl> < / span > < / span >
< span class = "r-in" > < span > < span class = "kw" > if< / span > < span class = "op" > (< / span > < span class = "kw" > < a href = "https://rdrr.io/r/base/library.html" class = "external-link" > require< / a > < / span > < span class = "op" > (< / span > < span class = "st" > < a href = "https://dplyr.tidyverse.org" class = "external-link" > "dplyr"< / a > < / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > {< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # get susceptibility for antibiotics whose name contains "trim":< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > example_isolates< / span > < span class = "op" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/filter.html" class = "external-link" > filter< / a > < / span > < span class = "op" > (< / span > < span class = "fu" > < a href = "first_isolate.html" > first_isolate< / a > < / span > < span class = "op" > (< / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/group_by.html" class = "external-link" > group_by< / a > < / span > < span class = "op" > (< / span > < span class = "va" > ward< / span > < span class = "op" > )< / span > < span class = "op" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/summarise.html" class = "external-link" > summarise< / a > < / span > < span class = "op" > (< / span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/across.html" class = "external-link" > across< / a > < / span > < span class = "op" > (< / span > < span class = "fu" > ab_selector< / span > < span class = "op" > (< / span > < span class = "va" > name< / span > < span class = "op" > < a href = "like.html" > %like%< / a > < / span > < span class = "st" > "trim"< / span > < span class = "op" > )< / span > , < span class = "va" > susceptibility< / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "op" > }< / span > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For ab_selector(name %like% "trim") using columns 'TMP' (trimethoprim)< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > and 'SXT' (trimethoprim/sulfamethoxazole)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 3 × 3< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > ward TMP SXT< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > Clinical 0.627 0.807< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > ICU 0.551 0.780< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > Outpatient 0.667 0.821< / span >
< span class = "r-in" > < span > < span class = "kw" > if< / span > < span class = "op" > (< / span > < span class = "kw" > < a href = "https://rdrr.io/r/base/library.html" class = "external-link" > require< / a > < / span > < span class = "op" > (< / span > < span class = "st" > < a href = "https://dplyr.tidyverse.org" class = "external-link" > "dplyr"< / a > < / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > {< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # this will select columns 'IPM' (imipenem) and 'MEM' (meropenem):< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > example_isolates< / span > < span class = "op" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/select.html" class = "external-link" > 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 > < / span >
< span class = "r-in" > < span > < span class = "op" > }< / span > < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 2,000 × 2< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > IPM MEM < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 4< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 5< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 6< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 7< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 8< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 9< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 10< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 1,990 more rows< / span > < / span >
< span class = "r-in" > < span > < span class = "kw" > if< / span > < span class = "op" > (< / span > < span class = "kw" > < a href = "https://rdrr.io/r/base/library.html" class = "external-link" > require< / a > < / span > < span class = "op" > (< / span > < span class = "st" > < a href = "https://dplyr.tidyverse.org" class = "external-link" > "dplyr"< / a > < / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > {< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # this will select columns 'mo', 'AMK', 'GEN', 'KAN' and 'TOB':< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > example_isolates< / span > < span class = "op" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/select.html" class = "external-link" > 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 > < / span >
< span class = "r-in" > < span > < span class = "op" > }< / span > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 2,000 × 5< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > mo GEN TOB AMK KAN < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < mo> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > B_ESCHR_COLI NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > B_ESCHR_COLI NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > B_STPHY_EPDR NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 4< / span > B_STPHY_EPDR NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 5< / span > B_STPHY_EPDR NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 6< / span > B_STPHY_EPDR NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 7< / span > B_STPHY_AURS NA S NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 8< / span > B_STPHY_AURS NA S NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 9< / span > B_STPHY_EPDR NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 10< / span > B_STPHY_EPDR NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 1,990 more rows< / span > < / span >
< span class = "r-in" > < span > < span class = "kw" > if< / span > < span class = "op" > (< / span > < span class = "kw" > < a href = "https://rdrr.io/r/base/library.html" class = "external-link" > require< / a > < / span > < span class = "op" > (< / span > < span class = "st" > < a href = "https://dplyr.tidyverse.org" class = "external-link" > "dplyr"< / a > < / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > {< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # any() and all() work in dplyr's filter() too:< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > example_isolates< / span > < span class = "op" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/filter.html" class = "external-link" > filter< / a > < / span > < span class = "op" > (< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "fu" > < a href = "https://rdrr.io/r/base/any.html" class = "external-link" > 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 > < / span >
< span class = "r-in" > < span > < span class = "fu" > < a href = "https://rdrr.io/r/base/all.html" class = "external-link" > 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 > < / span >
< span class = "r-in" > < span > < span class = "op" > )< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "op" > }< / span > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For cephalosporins_2nd() using columns 'CXM' (cefuroxime) and 'FOX'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (cefoxitin)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 112 × 46< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > date patient age gender ward mo PEN OXA FLC AMX < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < date> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < mo> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > 2002-02-21 4FC193 69 M Clinical B_ENTRC_FACM NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > 2002-03-16 4FC193 69 M Clinical B_PSDMN_AERG R NA NA R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > 2002-04-08 130252 78 M ICU B_ENTRC_FCLS NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 4< / span > 2002-06-23 798871 82 M Clinical B_ENTRC_FCLS NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 5< / span > 2002-06-23 798871 82 M Clinical B_ENTRC_FCLS NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 6< / span > 2002-07-21 955940 82 F Clinical B_PSDMN_AERG R NA NA R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 7< / span > 2002-07-21 955940 82 F Clinical B_PSDMN_AERG R NA NA R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 8< / span > 2003-08-13 F35553 52 M ICU B_ENTRC_FCLS NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 9< / span > 2003-09-05 F35553 52 M ICU B_ENTRC_FCLS NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 10< / span > 2004-06-09 529296 69 M ICU B_ENTRC_FACM NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 102 more rows< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 36 more variables: AMC < sir> , AMP < sir> , TZP < sir> , CZO < sir> , FEP < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # CXM < sir> , FOX < sir> , CTX < sir> , CAZ < sir> , CRO < sir> , GEN < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # TOB < sir> , AMK < sir> , KAN < sir> , TMP < sir> , SXT < sir> , NIT < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # FOS < sir> , LNZ < sir> , CIP < sir> , MFX < sir> , VAN < sir> , TEC < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # TCY < sir> , TGC < sir> , DOX < sir> , ERY < sir> , CLI < sir> , AZM < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # IPM < sir> , MEM < sir> , MTR < sir> , CHL < sir> , COL < sir> , MUP < sir> , …< / span > < / span >
< span class = "r-in" > < span > < span class = "kw" > if< / span > < span class = "op" > (< / span > < span class = "kw" > < a href = "https://rdrr.io/r/base/library.html" class = "external-link" > require< / a > < / span > < span class = "op" > (< / span > < span class = "st" > < a href = "https://dplyr.tidyverse.org" class = "external-link" > "dplyr"< / a > < / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > {< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # also works with c():< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > example_isolates< / span > < span class = "op" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/filter.html" class = "external-link" > filter< / a > < / span > < span class = "op" > (< / span > < span class = "fu" > < a href = "https://rdrr.io/r/base/any.html" class = "external-link" > any< / a > < / span > < span class = "op" > (< / span > < span class = "fu" > < a href = "https://rdrr.io/r/base/c.html" class = "external-link" > 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 > < / span >
< span class = "r-in" > < span > < span class = "op" > }< / span > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem)< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 531 × 46< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > date patient age gender ward mo PEN OXA FLC AMX < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < date> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < mo> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > 2002-02-21 4FC193 69 M Clinical B_ENTRC_FACM NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > 2002-03-16 4FC193 69 M Clinical B_PSDMN_AERG R NA NA R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > 2002-03-17 B30560 78 M Clinical B_STPHY_CONS R NA R R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 4< / span > 2002-04-04 E61143 67 M Clinical B_STRPT_SNGN S NA NA S < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 5< / span > 2002-04-08 130252 78 M ICU B_ENTRC_FCLS NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 6< / span > 2002-04-14 F30196 73 M Outpati… B_STRPT_GRPB S NA S S < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 7< / span > 2002-05-07 D91570 83 M Clinical B_STPHY_CONS R NA R R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 8< / span > 2002-05-07 D91570 83 M Clinical B_STPHY_CONS R NA R R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 9< / span > 2002-05-14 077552 86 F Clinical B_STRPT_PNMN S NA NA S < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 10< / span > 2002-05-14 077552 86 F Clinical B_STRPT_PNMN S NA NA S < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 521 more rows< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 36 more variables: AMC < sir> , AMP < sir> , TZP < sir> , CZO < sir> , FEP < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # CXM < sir> , FOX < sir> , CTX < sir> , CAZ < sir> , CRO < sir> , GEN < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # TOB < sir> , AMK < sir> , KAN < sir> , TMP < sir> , SXT < sir> , NIT < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # FOS < sir> , LNZ < sir> , CIP < sir> , MFX < sir> , VAN < sir> , TEC < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # TCY < sir> , TGC < sir> , DOX < sir> , ERY < sir> , CLI < sir> , AZM < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # IPM < sir> , MEM < sir> , MTR < sir> , CHL < sir> , COL < sir> , MUP < sir> , …< / span > < / span >
< span class = "r-in" > < span > < span class = "kw" > if< / span > < span class = "op" > (< / span > < span class = "kw" > < a href = "https://rdrr.io/r/base/library.html" class = "external-link" > require< / a > < / span > < span class = "op" > (< / span > < span class = "st" > < a href = "https://dplyr.tidyverse.org" class = "external-link" > "dplyr"< / a > < / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > {< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # not setting any/all will automatically apply all():< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > example_isolates< / span > < span class = "op" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/filter.html" class = "external-link" > 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 > < / span >
< span class = "r-in" > < span > < span class = "op" > }< / span > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ Assuming a filter on all 4 aminoglycosides. Wrap around all() or< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > any() to prevent this note.< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 427 × 46< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > date patient age gender ward mo PEN OXA FLC AMX < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < date> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < mo> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > 2002-02-21 4FC193 69 M Clinical B_ENTRC_FACM NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > 2002-03-17 B30560 78 M Clinical B_STPHY_CONS R NA R R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > 2002-04-04 E61143 67 M Clinical B_STRPT_SNGN S NA NA S < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 4< / span > 2002-04-08 130252 78 M ICU B_ENTRC_FCLS NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 5< / span > 2002-04-14 F30196 73 M Outpati… B_STRPT_GRPB S NA S S < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 6< / span > 2002-05-07 D91570 83 M Clinical B_STPHY_CONS R NA R R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 7< / span > 2002-05-07 D91570 83 M Clinical B_STPHY_CONS R NA R R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 8< / span > 2002-05-14 077552 86 F Clinical B_STRPT_PNMN S NA NA S < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 9< / span > 2002-05-14 077552 86 F Clinical B_STRPT_PNMN S NA NA S < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 10< / span > 2002-05-16 D25302 65 F ICU B_STRPT_ANGN S NA NA S < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 417 more rows< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 36 more variables: AMC < sir> , AMP < sir> , TZP < sir> , CZO < sir> , FEP < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # CXM < sir> , FOX < sir> , CTX < sir> , CAZ < sir> , CRO < sir> , GEN < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # TOB < sir> , AMK < sir> , KAN < sir> , TMP < sir> , SXT < sir> , NIT < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # FOS < sir> , LNZ < sir> , CIP < sir> , MFX < sir> , VAN < sir> , TEC < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # TCY < sir> , TGC < sir> , DOX < sir> , ERY < sir> , CLI < sir> , AZM < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # IPM < sir> , MEM < sir> , MTR < sir> , CHL < sir> , COL < sir> , MUP < sir> , …< / span > < / span >
< span class = "r-in" > < span > < span class = "kw" > if< / span > < span class = "op" > (< / span > < span class = "kw" > < a href = "https://rdrr.io/r/base/library.html" class = "external-link" > require< / a > < / span > < span class = "op" > (< / span > < span class = "st" > < a href = "https://dplyr.tidyverse.org" class = "external-link" > "dplyr"< / a > < / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > {< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # this will select columns 'mo' and all antimycobacterial drugs ('RIF'):< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > example_isolates< / span > < span class = "op" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/select.html" class = "external-link" > 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 > < / span >
< span class = "r-in" > < span > < span class = "op" > }< / span > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For ab_class("mycobact") using column 'RIF' (rifampicin)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 2,000 × 2< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > mo RIF < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < mo> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > B_ESCHR_COLI R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > B_ESCHR_COLI R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > B_STPHY_EPDR NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 4< / span > B_STPHY_EPDR NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 5< / span > B_STPHY_EPDR NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 6< / span > B_STPHY_EPDR NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 7< / span > B_STPHY_AURS NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 8< / span > B_STPHY_AURS NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 9< / span > B_STPHY_EPDR NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 10< / span > B_STPHY_EPDR NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 1,990 more rows< / span > < / span >
< span class = "r-in" > < span > < span class = "kw" > if< / span > < span class = "op" > (< / span > < span class = "kw" > < a href = "https://rdrr.io/r/base/library.html" class = "external-link" > require< / a > < / span > < span class = "op" > (< / span > < span class = "st" > < a href = "https://dplyr.tidyverse.org" class = "external-link" > "dplyr"< / a > < / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > {< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # get bug/drug combinations for only glycopeptides in Gram-positives:< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > example_isolates< / span > < span class = "op" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/filter.html" class = "external-link" > 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" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/select.html" class = "external-link" > select< / a > < / span > < span class = "op" > (< / span > < span class = "va" > mo< / span > , < span class = "fu" > glycopeptides< / span > < span class = "op" > (< / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < / span > < / span >
< span class = "r-in" > < 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" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "fu" > < a href = "https://rdrr.io/r/base/format.html" class = "external-link" > format< / a > < / span > < span class = "op" > (< / span > < span class = "op" > )< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "op" > }< / span > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ Using column 'mo' as input for mo_is_gram_positive()< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For glycopeptides() using columns 'VAN' (vancomycin) and 'TEC'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (teicoplanin)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 2 × 8< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > Group Drug CoNS `E. faecalis` `S. aureus` `S. epidermidis` `S. hominis`< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > < span style = "color: #949494;" > "< / span > Glycopep… Teic… < span style = "color: #949494;" > ""< / span > < span style = "color: #949494;" > ""< / span > < span style = "color: #949494;" > "< / span > 0.0% (0/… < span style = "color: #949494;" > "< / span > 64.1% (25/39)< span style = "color: #949494;" > "< / span > < span style = "color: #949494;" > "< / span > 6.8% (4/5…< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > < span style = "color: #949494;" > ""< / span > Vanc… < span style = "color: #949494;" > "< / span > 0.… < span style = "color: #949494;" > "< / span > 0.0% (0/39… < span style = "color: #949494;" > "< / span > 0.0% (0/… < span style = "color: #949494;" > "< / span > 0.0% (0/171)< span style = "color: #949494;" > "< / span > < span style = "color: #949494;" > "< / span > 0.0% (0/8…< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 1 more variable: `S. pneumoniae` < chr> < / span > < / span >
< span class = "r-in" > < span > < span class = "kw" > if< / span > < span class = "op" > (< / span > < span class = "kw" > < a href = "https://rdrr.io/r/base/library.html" class = "external-link" > require< / a > < / span > < span class = "op" > (< / span > < span class = "st" > < a href = "https://dplyr.tidyverse.org" class = "external-link" > "dplyr"< / a > < / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > {< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "fu" > < a href = "https://rdrr.io/r/base/data.frame.html" class = "external-link" > data.frame< / a > < / span > < span class = "op" > (< / span > < / span > < / span >
< span class = "r-in" > < span > some_column < span class = "op" > =< / span > < span class = "st" > "some_value"< / span > ,< / span > < / span >
< span class = "r-in" > < span > J01CA01 < span class = "op" > =< / span > < span class = "st" > "S"< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "op" > )< / span > < span class = "op" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < span class = "co" > # ATC code of ampicillin< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/select.html" class = "external-link" > 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 > < / span >
< span class = "r-in" > < span > < span class = "op" > }< / span > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For penicillins() using column 'J01CA01' (ampicillin)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > J01CA01< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 1 S< / span >
< span class = "r-in" > < span > < span class = "kw" > if< / span > < span class = "op" > (< / span > < span class = "kw" > < a href = "https://rdrr.io/r/base/library.html" class = "external-link" > require< / a > < / span > < span class = "op" > (< / span > < span class = "st" > < a href = "https://dplyr.tidyverse.org" class = "external-link" > "dplyr"< / a > < / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > {< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # with recent versions of dplyr, this is all equal:< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > x< / span > < span class = "op" > < -< / 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 > < / span >
< span class = "r-in" > < span > < span class = "va" > y< / span > < span class = "op" > < -< / span > < span class = "va" > example_isolates< / span > < span class = "op" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/filter.html" class = "external-link" > 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 > < / span >
< span class = "r-in" > < span > < span class = "va" > z< / span > < span class = "op" > < -< / span > < span class = "va" > example_isolates< / span > < span class = "op" > < a href = "https://magrittr.tidyverse.org/reference/pipe.html" class = "external-link" > %> %< / a > < / span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/filter.html" class = "external-link" > filter< / a > < / span > < span class = "op" > (< / span > < span class = "fu" > < a href = "https://dplyr.tidyverse.org/reference/across.html" class = "external-link" > if_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 = "va" > .x< / span > < span class = "op" > ==< / span > < span class = "st" > "R"< / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "fu" > < a href = "https://rdrr.io/r/base/identical.html" class = "external-link" > identical< / a > < / span > < span class = "op" > (< / span > < span class = "va" > x< / span > , < span class = "va" > y< / span > < span class = "op" > )< / span > < span class = "op" > & & < / span > < span class = "fu" > < a href = "https://rdrr.io/r/base/identical.html" class = "external-link" > identical< / a > < / span > < span class = "op" > (< / span > < span class = "va" > y< / span > , < span class = "va" > z< / span > < span class = "op" > )< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "op" > }< / span > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem)< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ Assuming a filter on all 2 carbapenems. Wrap around all() or any() to< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > prevent this note.< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem)< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ Assuming a filter on all 2 carbapenems. Wrap around all() or any() to< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > prevent this note.< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > [1] TRUE< / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # base R ------------------------------------------------------------------< / span > < / span > < / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # select columns 'IPM' (imipenem) and 'MEM' (meropenem)< / span > < / span > < / span >
< span class = "r-in" > < 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 > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 2,000 × 2< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > IPM MEM < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 4< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 5< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 6< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 7< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 8< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 9< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 10< / span > NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 1,990 more rows< / span > < / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # select columns 'mo', 'AMK', 'GEN', 'KAN' and 'TOB'< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > example_isolates< / span > < span class = "op" > [< / span > , < span class = "fu" > < a href = "https://rdrr.io/r/base/c.html" class = "external-link" > 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 > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 2,000 × 5< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > mo GEN TOB AMK KAN < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < mo> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > B_ESCHR_COLI NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > B_ESCHR_COLI NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > B_STPHY_EPDR NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 4< / span > B_STPHY_EPDR NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 5< / span > B_STPHY_EPDR NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 6< / span > B_STPHY_EPDR NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 7< / span > B_STPHY_AURS NA S NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 8< / span > B_STPHY_AURS NA S NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 9< / span > B_STPHY_EPDR NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 10< / span > B_STPHY_EPDR NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 1,990 more rows< / span > < / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # select only antibiotic columns with DDDs for oral treatment< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > example_isolates< / span > < span class = "op" > [< / span > , < span class = "fu" > administrable_per_os< / span > < span class = "op" > (< / span > < span class = "op" > )< / span > < span class = "op" > ]< / span > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For administrable_per_os() using columns 'OXA' (oxacillin), 'FLC'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (flucloxacillin), 'AMX' (amoxicillin), 'AMC' (amoxicillin/clavulanic acid),< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > 'AMP' (ampicillin), 'CXM' (cefuroxime), 'KAN' (kanamycin), 'TMP'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (trimethoprim), 'NIT' (nitrofurantoin), 'FOS' (fosfomycin), 'LNZ'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (linezolid), 'CIP' (ciprofloxacin), 'MFX' (moxifloxacin), 'VAN'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (vancomycin), 'TCY' (tetracycline), 'DOX' (doxycycline), 'ERY'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (erythromycin), 'CLI' (clindamycin), 'AZM' (azithromycin), 'MTR'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (metronidazole), 'CHL' (chloramphenicol), 'COL' (colistin), and 'RIF'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (rifampicin)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 2,000 × 23< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > OXA FLC AMX AMC AMP CXM KAN TMP NIT FOS LNZ CIP MFX < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > NA NA NA I NA I NA R NA NA R NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > NA NA NA I NA I NA R NA NA R NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > NA R NA NA NA R NA S NA NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 4< / span > NA R NA NA NA R NA S NA NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 5< / span > NA R NA NA NA R NA R NA NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 6< / span > NA R NA NA NA R NA R NA NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 7< / span > NA S R S R S NA R NA NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 8< / span > NA S R S R S NA R NA NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 9< / span > NA R NA NA NA R NA S NA NA NA S NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 10< / span > NA S NA NA NA S NA S NA NA NA S NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 1,990 more rows< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 10 more variables: VAN < sir> , TCY < sir> , DOX < sir> , ERY < sir> , CLI < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # AZM < sir> , MTR < sir> , CHL < sir> , COL < sir> , RIF < sir> < / span > < / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # filter using any() or all()< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > example_isolates< / span > < span class = "op" > [< / span > < span class = "fu" > < a href = "https://rdrr.io/r/base/any.html" class = "external-link" > 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 > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 55 × 46< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > date patient age gender ward mo PEN OXA FLC AMX < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < date> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < mo> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > 2004-06-09 529296 69 M ICU B_ENTRC_FACM NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > 2004-06-09 529296 69 M ICU B_ENTRC_FACM NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > 2004-11-03 D65308 80 F ICU B_STNTR_MLTP R NA NA R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 4< / span > 2005-04-21 452212 82 F ICU B_ENTRC NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 5< / span > 2005-04-22 452212 82 F ICU B_ENTRC NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 6< / span > 2005-04-22 452212 82 F ICU B_ENTRC_FACM NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 7< / span > 2007-02-21 8BBC46 61 F Clinical B_ENTRC_FACM NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 8< / span > 2007-12-15 401043 72 M Clinical B_ENTRC_FACM NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 9< / span > 2008-01-22 1710B8 82 M Clinical B_PROTS_MRBL R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 10< / span > 2008-01-22 1710B8 82 M Clinical B_PROTS_MRBL R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 45 more rows< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 36 more variables: AMC < sir> , AMP < sir> , TZP < sir> , CZO < sir> , FEP < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # CXM < sir> , FOX < sir> , CTX < sir> , CAZ < sir> , CRO < sir> , GEN < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # TOB < sir> , AMK < sir> , KAN < sir> , TMP < sir> , SXT < sir> , NIT < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # FOS < sir> , LNZ < sir> , CIP < sir> , MFX < sir> , VAN < sir> , TEC < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # TCY < sir> , TGC < sir> , DOX < sir> , ERY < sir> , CLI < sir> , AZM < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # IPM < sir> , MEM < sir> , MTR < sir> , CHL < sir> , COL < sir> , MUP < sir> , …< / span > < / span >
< span class = "r-in" > < span > < span class = "fu" > < a href = "https://rdrr.io/r/base/subset.html" class = "external-link" > 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" class = "external-link" > 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 > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 55 × 46< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > date patient age gender ward mo PEN OXA FLC AMX < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < date> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < mo> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > 2004-06-09 529296 69 M ICU B_ENTRC_FACM NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > 2004-06-09 529296 69 M ICU B_ENTRC_FACM NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > 2004-11-03 D65308 80 F ICU B_STNTR_MLTP R NA NA R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 4< / span > 2005-04-21 452212 82 F ICU B_ENTRC NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 5< / span > 2005-04-22 452212 82 F ICU B_ENTRC NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 6< / span > 2005-04-22 452212 82 F ICU B_ENTRC_FACM NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 7< / span > 2007-02-21 8BBC46 61 F Clinical B_ENTRC_FACM NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 8< / span > 2007-12-15 401043 72 M Clinical B_ENTRC_FACM NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 9< / span > 2008-01-22 1710B8 82 M Clinical B_PROTS_MRBL R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 10< / span > 2008-01-22 1710B8 82 M Clinical B_PROTS_MRBL R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 45 more rows< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 36 more variables: AMC < sir> , AMP < sir> , TZP < sir> , CZO < sir> , FEP < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # CXM < sir> , FOX < sir> , CTX < sir> , CAZ < sir> , CRO < sir> , GEN < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # TOB < sir> , AMK < sir> , KAN < sir> , TMP < sir> , SXT < sir> , NIT < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # FOS < sir> , LNZ < sir> , CIP < sir> , MFX < sir> , VAN < sir> , TEC < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # TCY < sir> , TGC < sir> , DOX < sir> , ERY < sir> , CLI < sir> , AZM < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # IPM < sir> , MEM < sir> , MTR < sir> , CHL < sir> , COL < sir> , MUP < sir> , …< / span > < / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # filter on any or all results in the carbapenem columns (i.e., IPM, MEM):< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > example_isolates< / span > < span class = "op" > [< / span > < span class = "fu" > < a href = "https://rdrr.io/r/base/any.html" class = "external-link" > 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 > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem)< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ Filtering any of columns 'IPM' and 'MEM' to contain value "S", "I" or "R"< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 962 × 46< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > date patient age gender ward mo PEN OXA FLC AMX < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < date> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < mo> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > 2002-01-19 738003 71 M Clinical B_ESCHR_COLI R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > 2002-01-19 738003 71 M Clinical B_ESCHR_COLI R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > 2002-01-22 F35553 50 M ICU B_PROTS_MRBL R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 4< / span > 2002-01-22 F35553 50 M ICU B_PROTS_MRBL R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 5< / span > 2002-02-05 067927 45 F ICU B_SERRT_MRCS R NA NA R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 6< / span > 2002-02-05 067927 45 F ICU B_SERRT_MRCS R NA NA R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 7< / span > 2002-02-05 067927 45 F ICU B_SERRT_MRCS R NA NA R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 8< / span > 2002-02-27 066895 85 F Clinical B_KLBSL_PNMN R NA NA R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 9< / span > 2002-02-27 066895 85 F Clinical B_KLBSL_PNMN R NA NA R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 10< / span > 2002-03-08 4FC193 69 M Clinical B_ESCHR_COLI R NA NA R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 952 more rows< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 36 more variables: AMC < sir> , AMP < sir> , TZP < sir> , CZO < sir> , FEP < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # CXM < sir> , FOX < sir> , CTX < sir> , CAZ < sir> , CRO < sir> , GEN < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # TOB < sir> , AMK < sir> , KAN < sir> , TMP < sir> , SXT < sir> , NIT < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # FOS < sir> , LNZ < sir> , CIP < sir> , MFX < sir> , VAN < sir> , TEC < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # TCY < sir> , TGC < sir> , DOX < sir> , ERY < sir> , CLI < sir> , AZM < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # IPM < sir> , MEM < sir> , MTR < sir> , CHL < sir> , COL < sir> , MUP < sir> , …< / span > < / span >
< span class = "r-in" > < span > < span class = "va" > example_isolates< / span > < span class = "op" > [< / span > < span class = "fu" > < a href = "https://rdrr.io/r/base/all.html" class = "external-link" > 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 > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem)< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ Filtering all of columns 'IPM' and 'MEM' to contain value "S", "I" or "R"< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 756 × 46< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > date patient age gender ward mo PEN OXA FLC AMX < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < date> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < mo> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > 2002-04-14 F30196 73 M Outpat… B_STRPT_GRPB S NA S S < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > 2003-04-08 114570 74 M ICU B_STRPT_PYGN S NA S S < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > 2003-04-08 114570 74 M ICU B_STRPT_GRPA S NA S S < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 4< / span > 2003-04-08 114570 74 M ICU B_STRPT_GRPA S NA S S < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 5< / span > 2003-08-14 F71508 0 F Clinic… B_STRPT_GRPB S NA S S < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 6< / span > 2003-10-16 650870 63 F ICU B_ESCHR_COLI R NA NA R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 7< / span > 2003-10-20 F35553 52 M ICU B_ENTRBC_CLOC R NA NA R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 8< / span > 2003-10-20 F35553 52 M ICU B_ENTRBC_CLOC R NA NA R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 9< / span > 2003-11-04 2FC253 87 F ICU B_ESCHR_COLI R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 10< / span > 2003-11-04 2FC253 87 F ICU B_ESCHR_COLI R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 746 more rows< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 36 more variables: AMC < sir> , AMP < sir> , TZP < sir> , CZO < sir> , FEP < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # CXM < sir> , FOX < sir> , CTX < sir> , CAZ < sir> , CRO < sir> , GEN < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # TOB < sir> , AMK < sir> , KAN < sir> , TMP < sir> , SXT < sir> , NIT < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # FOS < sir> , LNZ < sir> , CIP < sir> , MFX < sir> , VAN < sir> , TEC < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # TCY < sir> , TGC < sir> , DOX < sir> , ERY < sir> , CLI < sir> , AZM < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # IPM < sir> , MEM < sir> , MTR < sir> , CHL < sir> , COL < sir> , MUP < sir> , …< / span > < / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # filter with multiple antibiotic selectors using c()< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > example_isolates< / span > < span class = "op" > [< / span > < span class = "fu" > < a href = "https://rdrr.io/r/base/all.html" class = "external-link" > all< / a > < / span > < span class = "op" > (< / span > < span class = "fu" > < a href = "https://rdrr.io/r/base/c.html" class = "external-link" > 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 > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem)< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 26 × 46< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > date patient age gender ward mo PEN OXA FLC AMX < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < date> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < dbl> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < chr> < / span > < span style = "color: #949494; font-style: italic;" > < mo> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > 2004-11-03 D65308 80 F ICU B_STNTR_MLTP R NA NA R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > 2005-04-22 452212 82 F ICU B_ENTRC_FACM NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > 2007-02-21 8BBC46 61 F Clinical B_ENTRC_FACM NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 4< / span > 2007-12-15 401043 72 M Clinical B_ENTRC_FACM NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 5< / span > 2008-12-06 501361 43 F Clinical B_STNTR_MLTP R NA NA R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 6< / span > 2011-05-09 207325 82 F ICU B_ENTRC_FACM NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 7< / span > 2012-03-12 582258 80 M ICU B_STPHY_CONS R R R R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 8< / span > 2012-05-19 C25552 89 F Outpati… B_STPHY_CONS R R R R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 9< / span > 2012-07-17 F05015 83 M ICU B_STPHY_CONS R R R R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 10< / span > 2012-07-20 404299 66 F Clinical B_STPHY_CONS R R R R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 16 more rows< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 36 more variables: AMC < sir> , AMP < sir> , TZP < sir> , CZO < sir> , FEP < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # CXM < sir> , FOX < sir> , CTX < sir> , CAZ < sir> , CRO < sir> , GEN < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # TOB < sir> , AMK < sir> , KAN < sir> , TMP < sir> , SXT < sir> , NIT < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # FOS < sir> , LNZ < sir> , CIP < sir> , MFX < sir> , VAN < sir> , TEC < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # TCY < sir> , TGC < sir> , DOX < sir> , ERY < sir> , CLI < sir> , AZM < sir> ,< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # IPM < sir> , MEM < sir> , MTR < sir> , CHL < sir> , COL < sir> , MUP < sir> , …< / span > < / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # filter + select in one go: get penicillins in carbapenem-resistant strains< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > example_isolates< / span > < span class = "op" > [< / span > < span class = "fu" > < a href = "https://rdrr.io/r/base/any.html" class = "external-link" > 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 > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem)< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For penicillins() using columns 'PEN' (benzylpenicillin), 'OXA'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (oxacillin), 'FLC' (flucloxacillin), 'AMX' (amoxicillin), 'AMC'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (amoxicillin/clavulanic acid), 'AMP' (ampicillin), and 'TZP'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (piperacillin/tazobactam)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 55 × 7< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > PEN OXA FLC AMX AMC AMP TZP < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > NA NA NA NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > NA NA NA NA NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > R NA NA R R R R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 4< / span > NA NA NA NA NA NA R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 5< / span > NA NA NA NA NA NA R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 6< / span > NA NA NA NA NA NA R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 7< / span > NA NA NA NA NA NA R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 8< / span > NA NA NA NA NA NA R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 9< / span > R NA NA NA S NA S < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 10< / span > R NA NA NA S NA S < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 45 more rows< / span > < / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # You can combine selectors with '& ' to be more specific. For example,< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # penicillins() would select benzylpenicillin ('peni G') and< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # administrable_per_os() would select erythromycin. Yet, when combined these< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # drugs are both omitted since benzylpenicillin is not administrable per os< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # and erythromycin is not a penicillin:< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > example_isolates< / span > < span class = "op" > [< / span > , < span class = "fu" > penicillins< / span > < span class = "op" > (< / span > < span class = "op" > )< / span > < span class = "op" > & < / span > < span class = "fu" > administrable_per_os< / span > < span class = "op" > (< / span > < span class = "op" > )< / span > < span class = "op" > ]< / span > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For penicillins() using columns 'PEN' (benzylpenicillin), 'OXA'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (oxacillin), 'FLC' (flucloxacillin), 'AMX' (amoxicillin), 'AMC'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (amoxicillin/clavulanic acid), 'AMP' (ampicillin), and 'TZP'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (piperacillin/tazobactam)< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For administrable_per_os() using columns 'OXA' (oxacillin), 'FLC'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (flucloxacillin), 'AMX' (amoxicillin), 'AMC' (amoxicillin/clavulanic acid),< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > 'AMP' (ampicillin), 'CXM' (cefuroxime), 'KAN' (kanamycin), 'TMP'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (trimethoprim), 'NIT' (nitrofurantoin), 'FOS' (fosfomycin), 'LNZ'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (linezolid), 'CIP' (ciprofloxacin), 'MFX' (moxifloxacin), 'VAN'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (vancomycin), 'TCY' (tetracycline), 'DOX' (doxycycline), 'ERY'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (erythromycin), 'CLI' (clindamycin), 'AZM' (azithromycin), 'MTR'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (metronidazole), 'CHL' (chloramphenicol), 'COL' (colistin), and 'RIF'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (rifampicin)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 2,000 × 5< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > OXA FLC AMX AMC AMP < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > NA NA NA I NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > NA NA NA I NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > NA R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 4< / span > NA R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 5< / span > NA R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 6< / span > NA R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 7< / span > NA S R S R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 8< / span > NA S R S R < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 9< / span > NA R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 10< / span > NA S NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 1,990 more rows< / span > < / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # ab_selector() applies a filter in the `antibiotics` data set and is thus< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # very flexible. For instance, to select antibiotic columns with an oral DDD< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # of at least 1 gram:< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > example_isolates< / span > < span class = "op" > [< / span > , < span class = "fu" > ab_selector< / span > < span class = "op" > (< / span > < span class = "va" > oral_ddd< / span > < span class = "op" > > < / span > < span class = "fl" > 1< / span > < span class = "op" > & < / span > < span class = "va" > oral_units< / span > < span class = "op" > ==< / span > < span class = "st" > "g"< / span > < span class = "op" > )< / span > < span class = "op" > ]< / span > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For ab_selector(oral_ddd > 1 & oral_units == "g") using columns 'OXA'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (oxacillin), 'FLC' (flucloxacillin), 'AMX' (amoxicillin), 'AMC'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (amoxicillin/clavulanic acid), 'AMP' (ampicillin), 'KAN' (kanamycin), 'FOS'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (fosfomycin), 'LNZ' (linezolid), 'VAN' (vancomycin), 'ERY' (erythromycin),< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > 'CLI' (clindamycin), 'MTR' (metronidazole), and 'CHL' (chloramphenicol)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # A tibble: 2,000 × 13< / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > OXA FLC AMX AMC AMP KAN FOS LNZ VAN ERY CLI MTR CHL < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < span style = "color: #949494; font-style: italic;" > < sir> < / span > < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 1< / span > NA NA NA I NA NA NA R R R R NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 2< / span > NA NA NA I NA NA NA R R R R NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 3< / span > NA R NA NA NA NA NA NA S R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 4< / span > NA R NA NA NA NA NA NA S R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 5< / span > NA R NA NA NA NA NA NA S R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 6< / span > NA R NA NA NA NA NA NA S R R NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 7< / span > NA S R S R NA NA NA S S NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 8< / span > NA S R S R NA NA NA S S NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 9< / span > NA R NA NA NA NA NA NA S R NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #BCBCBC;" > 10< / span > NA S NA NA NA NA NA NA S S NA NA NA < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < span style = "color: #949494;" > # ℹ 1,990 more rows< / span > < / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # data.table --------------------------------------------------------------< / span > < / span > < / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # data.table is supported as well, just use it in the same way as with< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # base R, but add `with = FALSE` if using a single AB selector.< / span > < / span > < / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < span class = "kw" > if< / span > < span class = "op" > (< / span > < span class = "kw" > < a href = "https://rdrr.io/r/base/library.html" class = "external-link" > require< / a > < / span > < span class = "op" > (< / span > < span class = "st" > < a href = "https://r-datatable.com" class = "external-link" > "data.table"< / a > < / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > {< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > dt< / span > < span class = "op" > < -< / span > < span class = "fu" > < a href = "https://rdatatable.gitlab.io/data.table/reference/as.data.table.html" class = "external-link" > as.data.table< / a > < / span > < span class = "op" > (< / span > < span class = "va" > example_isolates< / span > < span class = "op" > )< / span > < / span > < / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # this does not work, it returns column *names*< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > dt< / span > < span class = "op" > [< / span > , < span class = "fu" > carbapenems< / span > < span class = "op" > (< / span > < span class = "op" > )< / span > < span class = "op" > ]< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "op" > }< / span > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > Loading required package: data.table< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > Attaching package: ‘ data.table’ < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > The following objects are masked from ‘ package:dplyr’ :< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > between, first, last< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > The following objects are masked from ‘ package:AMR’ :< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > %like%, like< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem)< / span >
< span class = "r-wrn co" > < span class = "r-pr" > #> < / span > < span class = "warning" > Warning: < / span > It should never be needed to print an antibiotic selector class. Are you< / span >
< span class = "r-wrn co" > < span class = "r-pr" > #> < / span > using data.table? Then add the argument with = FALSE, see our examples at< / span >
< span class = "r-wrn co" > < span class = "r-pr" > #> < / span > ?ab_selector.< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > Class 'ab_selector'< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > [1] IPM MEM< / span >
< span class = "r-in" > < span > < span class = "kw" > if< / span > < span class = "op" > (< / span > < span class = "kw" > < a href = "https://rdrr.io/r/base/library.html" class = "external-link" > require< / a > < / span > < span class = "op" > (< / span > < span class = "st" > < a href = "https://r-datatable.com" class = "external-link" > "data.table"< / a > < / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > {< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # so `with = FALSE` is required< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > dt< / span > < span class = "op" > [< / span > , < span class = "fu" > carbapenems< / span > < span class = "op" > (< / span > < span class = "op" > )< / span > , with < span class = "op" > =< / span > < span class = "cn" > FALSE< / span > < span class = "op" > ]< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "op" > }< / span > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > IPM MEM< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < sir> < sir> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 1: < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 2: < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 3: < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 4: < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 5: < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > --- < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 1996: < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 1997: S S< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 1998: S S< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 1999: S S< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 2000: S S< / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # for multiple selections or AB selectors, `with = FALSE` is not needed:< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "kw" > if< / span > < span class = "op" > (< / span > < span class = "kw" > < a href = "https://rdrr.io/r/base/library.html" class = "external-link" > require< / a > < / span > < span class = "op" > (< / span > < span class = "st" > < a href = "https://r-datatable.com" class = "external-link" > "data.table"< / a > < / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > {< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > dt< / span > < span class = "op" > [< / span > , < span class = "fu" > < a href = "https://rdrr.io/r/base/c.html" class = "external-link" > 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 > < / span > < / span >
< span class = "r-in" > < span > < span class = "op" > }< / span > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > mo GEN TOB AMK KAN< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < mo> < sir> < sir> < sir> < sir> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 1: B_ESCHR_COLI < NA> < NA> < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 2: B_ESCHR_COLI < NA> < NA> < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 3: B_STPHY_EPDR < NA> < NA> < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 4: B_STPHY_EPDR < NA> < NA> < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 5: B_STPHY_EPDR < NA> < NA> < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > --- < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 1996: B_STRPT_PNMN R R R R< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 1997: B_ESCHR_COLI S S S < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 1998: B_STPHY_CONS S < NA> < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 1999: B_ESCHR_COLI S S < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 2000: B_KLBSL_PNMN S S < NA> < NA> < / span >
< span class = "r-in" > < span > < span class = "kw" > if< / span > < span class = "op" > (< / span > < span class = "kw" > < a href = "https://rdrr.io/r/base/library.html" class = "external-link" > require< / a > < / span > < span class = "op" > (< / span > < span class = "st" > < a href = "https://r-datatable.com" class = "external-link" > "data.table"< / a > < / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > {< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > dt< / span > < span class = "op" > [< / span > , < span class = "fu" > < a href = "https://rdrr.io/r/base/c.html" class = "external-link" > 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 > < / span >
< span class = "r-in" > < span > < span class = "op" > }< / span > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem)< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > IPM MEM GEN TOB AMK KAN< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < sir> < sir> < sir> < sir> < sir> < sir> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 1: < NA> < NA> < NA> < NA> < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 2: < NA> < NA> < NA> < NA> < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 3: < NA> < NA> < NA> < NA> < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 4: < NA> < NA> < NA> < NA> < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 5: < NA> < NA> < NA> < NA> < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > --- < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 1996: < NA> < NA> R R R R< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 1997: S S S S S < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 1998: S S S < NA> < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 1999: S S S S < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 2000: S S S S < NA> < NA> < / span >
< span class = "r-in" > < span > < / span > < / span >
< span class = "r-in" > < span > < span class = "co" > # row filters are also supported:< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "kw" > if< / span > < span class = "op" > (< / span > < span class = "kw" > < a href = "https://rdrr.io/r/base/library.html" class = "external-link" > require< / a > < / span > < span class = "op" > (< / span > < span class = "st" > < a href = "https://r-datatable.com" class = "external-link" > "data.table"< / a > < / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > {< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > dt< / span > < span class = "op" > [< / span > < span class = "fu" > < a href = "https://rdrr.io/r/base/any.html" class = "external-link" > 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" > "S"< / span > < span class = "op" > )< / span > , < span class = "op" > ]< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "op" > }< / span > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > date patient age gender ward mo PEN OXA FLC< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < Date> < char> < num> < char> < char> < mo> < sir> < sir> < sir> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 1: 2002-01-19 738003 71 M Clinical B_ESCHR_COLI R < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 2: 2002-01-19 738003 71 M Clinical B_ESCHR_COLI R < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 3: 2002-01-22 F35553 50 M ICU B_PROTS_MRBL R < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 4: 2002-01-22 F35553 50 M ICU B_PROTS_MRBL R < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 5: 2002-02-05 067927 45 F ICU B_SERRT_MRCS R < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > --- < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 905: 2005-04-12 D71461 70 M ICU B_ESCHR_COLI R < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 906: 2009-11-12 650870 69 F Outpatient B_ESCHR_COLI R < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 907: 2012-06-14 8CBCF2 41 F Clinical B_STPHY_CONS R S S< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 908: 2012-10-11 175532 78 M Clinical B_ESCHR_COLI R < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 909: 2013-11-23 A97263 77 M Clinical B_KLBSL_PNMN R < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > AMX AMC AMP TZP CZO FEP CXM FOX CTX CAZ CRO GEN< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < sir> < sir> < sir> < sir> < sir> < sir> < sir> < sir> < sir> < sir> < sir> < sir> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 1: < NA> I < NA> < NA> < NA> < NA> S < NA> S < NA> S < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 2: < NA> I < NA> < NA> < NA> < NA> S < NA> S < NA> S < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 3: < NA> I < NA> < NA> < NA> < NA> S < NA> S S S < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 4: < NA> I < NA> < NA> < NA> < NA> S < NA> S S S < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 5: R R R < NA> R < NA> R R < NA> < NA> < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > --- < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 905: S S S S < NA> S S S S S S S< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 906: S S S S S S S S S S S S< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 907: < NA> S < NA> < NA> S S S S S R S S< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 908: R S R S < NA> S R R S S S S< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 909: R S R S < NA> S S S S S S S< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > TOB AMK KAN TMP SXT NIT FOS LNZ CIP MFX VAN TEC< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < sir> < sir> < sir> < sir> < sir> < sir> < sir> < sir> < sir> < sir> < sir> < sir> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 1: S < NA> < NA> S S < NA> < NA> R < NA> < NA> R R< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 2: S < NA> < NA> S S < NA> < NA> R < NA> < NA> R R< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 3: < NA> < NA> < NA> S S R < NA> R S < NA> R R< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 4: < NA> < NA> < NA> S S R < NA> R S < NA> R R< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 5: < NA> < NA> < NA> S S R < NA> R S < NA> R R< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > --- < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 905: S S < NA> < NA> S S < NA> R S < NA> R R< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 906: S S < NA> S S S < NA> R S < NA> R R< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 907: < NA> < NA> < NA> S S < NA> < NA> < NA> S < NA> S < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 908: S < NA> < NA> R R R < NA> R R R R R< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 909: S < NA> < NA> S S S < NA> R S < NA> R R< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > TCY TGC DOX ERY CLI AZM IPM MEM MTR CHL COL MUP< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < sir> < sir> < sir> < sir> < sir> < sir> < sir> < sir> < sir> < sir> < sir> < sir> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 1: < NA> < NA> < NA> R R R S < NA> < NA> < NA> < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 2: < NA> < NA> < NA> R R R S < NA> < NA> < NA> < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 3: R R R R R R S < NA> < NA> < NA> R < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 4: R R R R R R S < NA> < NA> < NA> R < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 5: R R R R R R S < NA> < NA> < NA> R < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > --- < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 905: < NA> < NA> < NA> R R R S S < NA> < NA> < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 906: < NA> < NA> < NA> R R R S S < NA> < NA> < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 907: < NA> < NA> < NA> S S S S S < NA> < NA> R < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 908: < NA> < NA> < NA> R R R S S < NA> < NA> S < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 909: < NA> < NA> < NA> R R R S S < NA> < NA> S < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > RIF< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < sir> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 1: R< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 2: R< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 3: R< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 4: R< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 5: R< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > --- < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 905: R< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 906: R< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 907: < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 908: R< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 909: R< / span >
< span class = "r-in" > < span > < span class = "kw" > if< / span > < span class = "op" > (< / span > < span class = "kw" > < a href = "https://rdrr.io/r/base/library.html" class = "external-link" > require< / a > < / span > < span class = "op" > (< / span > < span class = "st" > < a href = "https://r-datatable.com" class = "external-link" > "data.table"< / a > < / span > < span class = "op" > )< / span > < span class = "op" > )< / span > < span class = "op" > {< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "va" > dt< / span > < span class = "op" > [< / span > < span class = "fu" > < a href = "https://rdrr.io/r/base/any.html" class = "external-link" > 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" > "S"< / span > < span class = "op" > )< / span > , < span class = "fu" > penicillins< / span > < span class = "op" > (< / span > < span class = "op" > )< / span > , with < span class = "op" > =< / span > < span class = "cn" > FALSE< / span > < span class = "op" > ]< / span > < / span > < / span >
< span class = "r-in" > < span > < span class = "op" > }< / span > < / span > < / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem)< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > ℹ For penicillins() using columns 'PEN' (benzylpenicillin), 'OXA'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (oxacillin), 'FLC' (flucloxacillin), 'AMX' (amoxicillin), 'AMC'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (amoxicillin/clavulanic acid), 'AMP' (ampicillin), and 'TZP'< / span >
< span class = "r-msg co" > < span class = "r-pr" > #> < / span > (piperacillin/tazobactam)< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > PEN OXA FLC AMX AMC AMP TZP< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > < sir> < sir> < sir> < sir> < sir> < sir> < sir> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 1: R < NA> < NA> < NA> I < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 2: R < NA> < NA> < NA> I < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 3: R < NA> < NA> < NA> I < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 4: R < NA> < NA> < NA> I < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 5: R < NA> < NA> R R R < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > --- < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 905: R < NA> < NA> S S S S< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 906: R < NA> < NA> S S S S< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 907: R S S < NA> S < NA> < NA> < / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 908: R < NA> < NA> R S R S< / span >
< span class = "r-out co" > < span class = "r-pr" > #> < / span > 909: R < NA> < NA> R S R S< / span >
< span class = "r-in" > < span > < span class = "co" > # }< / span > < / span > < / span >
< / code > < / pre > < / div >
< / div >
< / main > < aside class = "col-md-3" > < nav id = "toc" > < h2 > On this page< / h2 >
< / nav > < / aside > < / div >