mirror of
https://github.com/msberends/AMR.git
synced 2025-05-02 05:03:55 +02:00
(v2.1.1.9251) fix colour on GitHub docs
This commit is contained in:
parent
4a336d040c
commit
6135805455
@ -1,5 +1,5 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 2.1.1.9250
|
Version: 2.1.1.9251
|
||||||
Date: 2025-04-21
|
Date: 2025-04-21
|
||||||
Title: Antimicrobial Resistance Data Analysis
|
Title: Antimicrobial Resistance Data Analysis
|
||||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||||
|
2
NEWS.md
2
NEWS.md
@ -1,4 +1,4 @@
|
|||||||
# AMR 2.1.1.9250
|
# AMR 2.1.1.9251
|
||||||
|
|
||||||
*(this beta version will eventually become v3.0. We're happy to reach a new major milestone soon, which will be all about the new One Health support! Install this beta using [the instructions here](https://amr-for-r.org/#get-this-package).)*
|
*(this beta version will eventually become v3.0. We're happy to reach a new major milestone soon, which will be all about the new One Health support! Install this beta using [the instructions here](https://amr-for-r.org/#get-this-package).)*
|
||||||
|
|
||||||
|
@ -1200,7 +1200,8 @@ has_colour <- function() {
|
|||||||
AMR_env$supports_colour <- !is.null(has_color) && isTRUE(has_color())
|
AMR_env$supports_colour <- !is.null(has_color) && isTRUE(has_color())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
isTRUE(AMR_env$supports_colour)
|
# always FALSE for GitHub documents (`index.Rmd` and `README.Rmd`)
|
||||||
|
isTRUE(AMR_env$supports_colour) && !identical(getOption("rmarkdown.output.format"), "github_document")
|
||||||
}
|
}
|
||||||
|
|
||||||
# set colours if console has_colour()
|
# set colours if console has_colour()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
<!-- README.md is generated from README.Rmd. Please edit that file -->
|
<!-- README.md is generated from README.Rmd; please edit that file. -->
|
||||||
|
|
||||||
# The `AMR` Package for R
|
# The `AMR` Package for R
|
||||||
|
|
||||||
|
@ -658,9 +658,11 @@ if (files_changed()) {
|
|||||||
|
|
||||||
# Update index.md and README.md -------------------------------------------
|
# Update index.md and README.md -------------------------------------------
|
||||||
if (files_changed("man/microorganisms.Rd") | files_changed("man/antimicrobials.Rd") | files_changed("man/clinical_breakpoints.Rd") | files_changed("man/antibiogram.Rd")) {
|
if (files_changed("man/microorganisms.Rd") | files_changed("man/antimicrobials.Rd") | files_changed("man/clinical_breakpoints.Rd") | files_changed("man/antibiogram.Rd")) {
|
||||||
usethis::ui_info("Update index.md")
|
usethis::ui_info("Rendering {usethis::ui_field('index.md')} and {usethis::ui_field('README.md')}")
|
||||||
suppressWarnings(rmarkdown::render("index.Rmd", quiet = TRUE))
|
suppressWarnings(rmarkdown::render("index.Rmd", quiet = TRUE))
|
||||||
suppressWarnings(rmarkdown::render("README.Rmd", quiet = TRUE))
|
suppressWarnings(rmarkdown::render("README.Rmd", quiet = TRUE))
|
||||||
|
unlink("index.html") # remove previews from folder
|
||||||
|
unlink("README.html")
|
||||||
}
|
}
|
||||||
|
|
||||||
# Finished ----------------------------------------------------------------
|
# Finished ----------------------------------------------------------------
|
||||||
|
47
index.md
47
index.md
@ -152,24 +152,25 @@ example_isolates %>%
|
|||||||
select(bacteria,
|
select(bacteria,
|
||||||
aminoglycosides(),
|
aminoglycosides(),
|
||||||
carbapenems())
|
carbapenems())
|
||||||
#> [34mℹ Using column '[1mmo[22m' as input for [48;5;255mmo_fullname()[49m[39m
|
#> ℹ Using column 'mo' as input for mo_fullname()
|
||||||
#> [34mℹ Using column '[1mmo[22m' as input for [48;5;255mmo_is_gram_negative()[49m[39m
|
#> ℹ Using column 'mo' as input for mo_is_gram_negative()
|
||||||
#> [34mℹ Using column '[1mmo[22m' as input for [48;5;255mmo_is_intrinsic_resistant()[49m[39m
|
#> ℹ Using column 'mo' as input for mo_is_intrinsic_resistant()
|
||||||
#> [34mℹ For [48;5;255maminoglycosides()[49m using columns '[1mGEN[22m' (gentamicin), '[1mTOB[22m' (tobramycin), '[1mAMK[22m' (amikacin), and '[1mKAN[22m' (kanamycin)[39m
|
#> ℹ Determining intrinsic resistance based on 'EUCAST Expected Resistant Phenotypes' v1.2 (2023). This note will be shown once per session.
|
||||||
#> [34mℹ For [48;5;255mcarbapenems()[49m using columns '[1mIPM[22m' (imipenem) and '[1mMEM[22m' (meropenem)[39m
|
#> ℹ For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB' (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)
|
||||||
|
#> ℹ For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem)
|
||||||
#> # A tibble: 35 × 7
|
#> # A tibble: 35 × 7
|
||||||
#> bacteria GEN TOB AMK KAN IPM MEM
|
#> bacteria GEN TOB AMK KAN IPM MEM
|
||||||
#> <chr> <sir> <sir> <sir> <sir> <sir> <sir>
|
#> <chr> <sir> <sir> <sir> <sir> <sir> <sir>
|
||||||
#> 1 Pseudomonas aeruginosa [48;5;222m[38;5;232m I [39m[49m [48;5;79m[38;5;232m S [39m[49m [38;5;249m NA[39m [48;5;217m[38;5;232m R [39m[49m [48;5;79m[38;5;232m S [39m[49m [38;5;249m NA[39m
|
#> 1 Pseudomonas aeruginosa I S NA R S NA
|
||||||
#> 2 Pseudomonas aeruginosa [48;5;222m[38;5;232m I [39m[49m [48;5;79m[38;5;232m S [39m[49m [38;5;249m NA[39m [48;5;217m[38;5;232m R [39m[49m [48;5;79m[38;5;232m S [39m[49m [38;5;249m NA[39m
|
#> 2 Pseudomonas aeruginosa I S NA R S NA
|
||||||
#> 3 Pseudomonas aeruginosa [48;5;222m[38;5;232m I [39m[49m [48;5;79m[38;5;232m S [39m[49m [38;5;249m NA[39m [48;5;217m[38;5;232m R [39m[49m [48;5;79m[38;5;232m S [39m[49m [38;5;249m NA[39m
|
#> 3 Pseudomonas aeruginosa I S NA R S NA
|
||||||
#> 4 Pseudomonas aeruginosa [48;5;79m[38;5;232m S [39m[49m [48;5;79m[38;5;232m S [39m[49m [48;5;79m[38;5;232m S [39m[49m [48;5;217m[38;5;232m R [39m[49m [38;5;249m NA[39m [48;5;79m[38;5;232m S [39m[49m
|
#> 4 Pseudomonas aeruginosa S S S R NA S
|
||||||
#> 5 Pseudomonas aeruginosa [48;5;79m[38;5;232m S [39m[49m [48;5;79m[38;5;232m S [39m[49m [48;5;79m[38;5;232m S [39m[49m [48;5;217m[38;5;232m R [39m[49m [48;5;79m[38;5;232m S [39m[49m [48;5;79m[38;5;232m S [39m[49m
|
#> 5 Pseudomonas aeruginosa S S S R S S
|
||||||
#> 6 Pseudomonas aeruginosa [48;5;79m[38;5;232m S [39m[49m [48;5;79m[38;5;232m S [39m[49m [48;5;79m[38;5;232m S [39m[49m [48;5;217m[38;5;232m R [39m[49m [48;5;79m[38;5;232m S [39m[49m [48;5;79m[38;5;232m S [39m[49m
|
#> 6 Pseudomonas aeruginosa S S S R S S
|
||||||
#> 7 Stenotrophomonas maltophilia [48;5;217m[38;5;232m R [39m[49m [48;5;217m[38;5;232m R [39m[49m [48;5;217m[38;5;232m R [39m[49m [48;5;217m[38;5;232m R [39m[49m [48;5;217m[38;5;232m R [39m[49m [48;5;217m[38;5;232m R [39m[49m
|
#> 7 Stenotrophomonas maltophilia R R R R R R
|
||||||
#> 8 Pseudomonas aeruginosa [48;5;79m[38;5;232m S [39m[49m [48;5;79m[38;5;232m S [39m[49m [48;5;79m[38;5;232m S [39m[49m [48;5;217m[38;5;232m R [39m[49m [38;5;249m NA[39m [48;5;79m[38;5;232m S [39m[49m
|
#> 8 Pseudomonas aeruginosa S S S R NA S
|
||||||
#> 9 Pseudomonas aeruginosa [48;5;79m[38;5;232m S [39m[49m [48;5;79m[38;5;232m S [39m[49m [48;5;79m[38;5;232m S [39m[49m [48;5;217m[38;5;232m R [39m[49m [38;5;249m NA[39m [48;5;79m[38;5;232m S [39m[49m
|
#> 9 Pseudomonas aeruginosa S S S R NA S
|
||||||
#> 10 Pseudomonas aeruginosa [48;5;79m[38;5;232m S [39m[49m [48;5;79m[38;5;232m S [39m[49m [48;5;79m[38;5;232m S [39m[49m [48;5;217m[38;5;232m R [39m[49m [48;5;79m[38;5;232m S [39m[49m [48;5;79m[38;5;232m S [39m[49m
|
#> 10 Pseudomonas aeruginosa S S S R S S
|
||||||
#> # ℹ 25 more rows
|
#> # ℹ 25 more rows
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -193,9 +194,9 @@ output format automatically (such as markdown, LaTeX, HTML, etc.).
|
|||||||
``` r
|
``` r
|
||||||
antibiogram(example_isolates,
|
antibiogram(example_isolates,
|
||||||
antimicrobials = c(aminoglycosides(), carbapenems()))
|
antimicrobials = c(aminoglycosides(), carbapenems()))
|
||||||
#> [34mℹ For [48;5;255maminoglycosides()[49m using columns '[1mGEN[22m' (gentamicin), '[1mTOB[22m' (tobramycin), '[1mAMK[22m' (amikacin), and '[1mKAN[22m' (kanamycin)[39m
|
#> ℹ For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB' (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)
|
||||||
#> [34mℹ For [48;5;255mcarbapenems()[49m using columns '[1mIPM[22m' (imipenem) and '[1mMEM[22m' (meropenem)[39m
|
#> ℹ For carbapenems() using columns 'IPM' (imipenem) and 'MEM' (meropenem)
|
||||||
#> [31mℹ 502 combinations had less than [48;5;255mminimum = 30[49m results and were ignored[39m
|
#> ℹ 502 combinations had less than minimum = 30 results and were ignored
|
||||||
```
|
```
|
||||||
|
|
||||||
| Pathogen | Amikacin | Gentamicin | Imipenem | Kanamycin | Meropenem | Tobramycin |
|
| Pathogen | Amikacin | Gentamicin | Imipenem | Kanamycin | Meropenem | Tobramycin |
|
||||||
@ -218,7 +219,7 @@ yield higher empiric coverage:
|
|||||||
antibiogram(example_isolates,
|
antibiogram(example_isolates,
|
||||||
antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"),
|
antimicrobials = c("TZP", "TZP+TOB", "TZP+GEN"),
|
||||||
mo_transform = "gramstain")
|
mo_transform = "gramstain")
|
||||||
#> [31mℹ 3 combinations had less than [48;5;255mminimum = 30[49m results and were ignored[39m
|
#> ℹ 3 combinations had less than minimum = 30 results and were ignored
|
||||||
```
|
```
|
||||||
|
|
||||||
| Pathogen | Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|
| Pathogen | Piperacillin/tazobactam | Piperacillin/tazobactam + Gentamicin | Piperacillin/tazobactam + Tobramycin |
|
||||||
@ -236,7 +237,7 @@ antibiogram(example_isolates,
|
|||||||
mo_transform = "gramstain",
|
mo_transform = "gramstain",
|
||||||
ab_transform = "name",
|
ab_transform = "name",
|
||||||
language = "uk") # Ukrainian
|
language = "uk") # Ukrainian
|
||||||
#> [31mℹ 3 combinations had less than [48;5;255mminimum = 30[49m results and were ignored[39m
|
#> ℹ 3 combinations had less than minimum = 30 results and were ignored
|
||||||
```
|
```
|
||||||
|
|
||||||
| Збудник | Гентаміцин | Тобраміцин | Ципрофлоксацин |
|
| Збудник | Гентаміцин | Тобраміцин | Ципрофлоксацин |
|
||||||
@ -320,13 +321,13 @@ out <- example_isolates %>%
|
|||||||
# calculate AMR using resistance(), over all aminoglycosides and polymyxins:
|
# calculate AMR using resistance(), over all aminoglycosides and polymyxins:
|
||||||
summarise(across(c(aminoglycosides(), polymyxins()),
|
summarise(across(c(aminoglycosides(), polymyxins()),
|
||||||
resistance))
|
resistance))
|
||||||
#> [34mℹ For [48;5;255maminoglycosides()[49m using columns '[1mGEN[22m' (gentamicin), '[1mTOB[22m' (tobramycin), '[1mAMK[22m' (amikacin), and '[1mKAN[22m' (kanamycin)[39m
|
#> ℹ For aminoglycosides() using columns 'GEN' (gentamicin), 'TOB' (tobramycin), 'AMK' (amikacin), and 'KAN' (kanamycin)
|
||||||
#> [34mℹ For [48;5;255mpolymyxins()[49m using column '[1mCOL[22m' (colistin)[39m
|
#> ℹ For polymyxins() using column 'COL' (colistin)
|
||||||
#> Warning: There was 1 warning in `summarise()`.
|
#> Warning: There was 1 warning in `summarise()`.
|
||||||
#> ℹ In argument: `across(c(aminoglycosides(), polymyxins()), resistance)`.
|
#> ℹ In argument: `across(c(aminoglycosides(), polymyxins()), resistance)`.
|
||||||
#> ℹ In group 3: `ward = "Outpatient"`.
|
#> ℹ In group 3: `ward = "Outpatient"`.
|
||||||
#> Caused by warning:
|
#> Caused by warning:
|
||||||
#> ! Introducing NA: only 23 results available for KAN in group: ward = "Outpatient" ([48;5;255mminimum[49m = 30).
|
#> ! Introducing NA: only 23 results available for KAN in group: ward = "Outpatient" (minimum = 30).
|
||||||
out
|
out
|
||||||
#> # A tibble: 3 × 6
|
#> # A tibble: 3 × 6
|
||||||
#> ward GEN TOB AMK KAN COL
|
#> ward GEN TOB AMK KAN COL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user