mirror of
https://github.com/msberends/AMR.git
synced 2026-03-29 23:35:52 +02:00
Built site for AMR@3.0.1.9037: 3d1412e
This commit is contained in:
@@ -660,10 +660,10 @@ sir_interpretation_history()
|
||||
#> # A tibble: 4 × 18
|
||||
#> datetime index method ab_given mo_given host_given input_given
|
||||
#> <dttm> <int> <chr> <chr> <chr> <chr> <chr>
|
||||
#> 1 2026-03-20 16:07:38 1 MIC amoxicillin Escherich… human 8
|
||||
#> 2 2026-03-20 16:07:38 1 MIC cipro Escherich… human 0.256
|
||||
#> 3 2026-03-20 16:07:39 1 DISK tobra Escherich… human 16
|
||||
#> 4 2026-03-20 16:07:39 1 DISK genta Escherich… human 18
|
||||
#> 1 2026-03-22 19:51:52 1 MIC amoxicillin Escherich… human 8
|
||||
#> 2 2026-03-22 19:51:52 1 MIC cipro Escherich… human 0.256
|
||||
#> 3 2026-03-22 19:51:52 1 DISK tobra Escherich… human 16
|
||||
#> 4 2026-03-22 19:51:53 1 DISK genta Escherich… human 18
|
||||
#> # ℹ 11 more variables: ab <ab>, mo <mo>, host <chr>, input <chr>,
|
||||
#> # outcome <sir>, notes <chr>, guideline <chr>, ref_table <chr>, uti <lgl>,
|
||||
#> # breakpoint_S_R <chr>, site <chr>
|
||||
@@ -672,15 +672,15 @@ sir_interpretation_history()
|
||||
# using parallel computing, which is available in base R:
|
||||
as.sir(df_wide, parallel = TRUE, info = TRUE)
|
||||
#> ℹ Returning a previously coerced value for an antimicrobial. Run
|
||||
#> `ab_reset_session()` (`?AMR::ab_reset_session()`) to reset this. This note
|
||||
#> will be shown once per session.
|
||||
#> `?ab_reset_session()` to reset this. This note will be shown once per
|
||||
#> session.
|
||||
#>
|
||||
#> Running in parallel mode using 3 out of 4 cores, on columns 'amoxicillin',
|
||||
#> 'cipro', 'tobra', 'genta', and 'ERY'...
|
||||
#> DONE
|
||||
#>
|
||||
#> ℹ Run `sir_interpretation_history()` (`?AMR::sir_interpretation_history()`) to
|
||||
#> retrieve a logbook with all details of the breakpoint interpretations.
|
||||
#> ℹ Run `?sir_interpretation_history()` to retrieve a logbook with all details of
|
||||
#> the breakpoint interpretations.
|
||||
#> microorganism amoxicillin cipro tobra genta ERY
|
||||
#> 1 Escherichia coli S I S S R
|
||||
|
||||
@@ -792,7 +792,7 @@ if (require("dplyr")) {
|
||||
df_wide %>%
|
||||
mutate_at(vars(cipro:genta), as.sir, mo = "E. coli", uti = TRUE)
|
||||
}
|
||||
#> ℹ For `aminopenicillins()` using column 'amoxicillin'
|
||||
#> ℹ For `?aminopenicillins()` using column amoxicillin
|
||||
#> Warning: There was 1 warning in `mutate()`.
|
||||
#> ℹ In argument: `across(...)`.
|
||||
#> Caused by warning:
|
||||
@@ -847,7 +847,7 @@ as.sir(
|
||||
ab = "AMP",
|
||||
guideline = "EUCAST"
|
||||
)
|
||||
#> Class 'sir'
|
||||
#> Class <sir>
|
||||
#> [1] R
|
||||
|
||||
as.sir(
|
||||
@@ -856,30 +856,28 @@ as.sir(
|
||||
ab = "ampicillin", # and `ab` with as.ab()
|
||||
guideline = "EUCAST"
|
||||
)
|
||||
#> Class 'sir'
|
||||
#> Class <sir>
|
||||
#> [1] R
|
||||
|
||||
|
||||
# For CLEANING existing SIR values -------------------------------------
|
||||
|
||||
as.sir(c("S", "SDD", "I", "R", "NI", "A", "B", "C"))
|
||||
#> Warning: in `as.sir()` (`?AMR::as.sir()`): 3 results truncated (38%) that were invalid
|
||||
#> antimicrobial interpretations: "A", "B", and "C"
|
||||
#> Class 'sir'
|
||||
#> Warning: in `?as.sir()`: 3 results truncated (38%) that were invalid antimicrobial
|
||||
#> interpretations: "A", "B", and "C"
|
||||
#> Class <sir>
|
||||
#> [1] S SDD I R NI <NA> <NA> <NA>
|
||||
as.sir("<= 0.002; S") # will return "S"
|
||||
#> Class 'sir'
|
||||
#> Class <sir>
|
||||
#> [1] S
|
||||
|
||||
as.sir(c(1, 2, 3))
|
||||
#> ℹ in `as.sir()` (`?AMR::as.sir()`): Interpreting input value 1 as "S", 2 as
|
||||
#> "I", and 3 as "R"
|
||||
#> Class 'sir'
|
||||
#> ℹ `?as.sir()`: Interpreting input value 1 as "S", 2 as "I", and 3 as "R"
|
||||
#> Class <sir>
|
||||
#> [1] S I R
|
||||
as.sir(c(1, 2, 3), S = 3, I = 2, R = 1)
|
||||
#> ℹ in `as.sir()` (`?AMR::as.sir()`): Interpreting input value 1 as "R", 2 as
|
||||
#> "I", and 3 as "S"
|
||||
#> Class 'sir'
|
||||
#> ℹ `?as.sir()`: Interpreting input value 1 as "R", 2 as "I", and 3 as "S"
|
||||
#> Class <sir>
|
||||
#> [1] R I S
|
||||
|
||||
sir_data <- as.sir(c(rep("S", 474), rep("I", 36), rep("R", 370)))
|
||||
|
||||
Reference in New Issue
Block a user