Note: the rules of ‘EUCAST Clinical Breakpoints v11.0 (2021)’ will be added in the next release, to be expected in February/March 2021.
+Note: the rules of ‘EUCAST Clinical Breakpoints v11.0 (2021)’ are implemented in the latest beta version, awaiting the next stable release (expected end of February)
PLEASE TAKE PART IN OUR SURVEY!
@@ -230,9 +230,9 @@ Since you are one of our users, we would like to know how you use the package an #> NOTE: Using column 'mo' as input for mo_is_intrinsic_resistant() #> NOTE: Determining intrinsic resistance based on 'EUCAST Expert Rules' and #> 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.2 (2020). -#> Selecting aminoglycosides: 'AMK' (amikacin), 'GEN' (gentamicin), -#> 'KAN' (kanamycin), 'TOB' (tobramycin) -#> Selecting carbapenems: 'IPM' (imipenem), 'MEM' (meropenem) +#> Selecting aminoglycosides: columns 'AMK' (amikacin), 'GEN' (gentamicin), +#> 'KAN' (kanamycin) and 'TOB' (tobramycin) +#> Selecting carbapenems: columns 'IPM' (imipenem) and 'MEM' (meropenem)
Since you are one of our users, we would like to know how you use the package and what it brought you or your organisation. If you have a minute, please anonymously fill in this short questionnaire. Your valuable input will help to improve the package and its functionalities. You can answer the open questions in either English, Spanish, French, Dutch, or German. Thank you very much in advance!
Take me to the 5-min survey!With only having defined a row filter on Gram-negative bacteria with intrinsic resistance to cefotaxime (
mo_is_gram_negative()
andmo_is_intrinsic_resistant()
) and a column selection on two antibiotic groups (aminoglycosides()
andcarbapenems()
), the reference data about all microorganisms and all antibiotics in theAMR
package make sure you get what you meant:
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 50d65fa82..4dd7b6e4a 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -12,7 +12,7 @@ articles: datasets: datasets.html resistance_predict: resistance_predict.html welcome_to_AMR: welcome_to_AMR.html -last_built: 2021-02-04T15:47Z +last_built: 2021-02-08T12:50Z urls: reference: https://msberends.github.io/AMR//reference article: https://msberends.github.io/AMR//articles diff --git a/docs/reference/AMR-deprecated.html b/docs/reference/AMR-deprecated.html index 380ea177b..374f569e2 100644 --- a/docs/reference/AMR-deprecated.html +++ b/docs/reference/AMR-deprecated.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/AMR.html b/docs/reference/AMR.html index fefb20ccf..ecc5ff9a9 100644 --- a/docs/reference/AMR.html +++ b/docs/reference/AMR.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/WHOCC.html b/docs/reference/WHOCC.html index a9fd67971..4720c3773 100644 --- a/docs/reference/WHOCC.html +++ b/docs/reference/WHOCC.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/WHONET.html b/docs/reference/WHONET.html index 3c1f6f7ec..308eb038f 100644 --- a/docs/reference/WHONET.html +++ b/docs/reference/WHONET.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/ab_from_text.html b/docs/reference/ab_from_text.html index 17066236e..ec9af198b 100644 --- a/docs/reference/ab_from_text.html +++ b/docs/reference/ab_from_text.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/ab_property.html b/docs/reference/ab_property.html index 8acbae63e..1aafb7886 100644 --- a/docs/reference/ab_property.html +++ b/docs/reference/ab_property.html @@ -82,7 +82,7 @@ @@ -317,7 +317,7 @@Details
-All output will be translated where possible.
+All output will be translated where possible.
The function
ab_url()
will return the direct URL to the official WHO website. A warning will be returned if the required ATC code is not available.Stable Lifecycle
diff --git a/docs/reference/age.html b/docs/reference/age.html index a0fab4fc3..78601d417 100644 --- a/docs/reference/age.html +++ b/docs/reference/age.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/age_groups.html b/docs/reference/age_groups.html index 2735e357f..63b2104ba 100644 --- a/docs/reference/age_groups.html +++ b/docs/reference/age_groups.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/antibiotic_class_selectors.html b/docs/reference/antibiotic_class_selectors.html index c63ae60e2..187ba8de7 100644 --- a/docs/reference/antibiotic_class_selectors.html +++ b/docs/reference/antibiotic_class_selectors.html @@ -83,7 +83,7 @@ @@ -244,33 +244,35 @@ -ab_class(ab_class, only_rsi_columns = NULL) +ab_class(ab_class, only_rsi_columns = FALSE) -aminoglycosides(only_rsi_columns = NULL) +aminoglycosides(only_rsi_columns = FALSE) -carbapenems(only_rsi_columns = NULL) +carbapenems(only_rsi_columns = FALSE) -cephalosporins(only_rsi_columns = NULL) +cephalosporins(only_rsi_columns = FALSE) -cephalosporins_1st(only_rsi_columns = NULL) +cephalosporins_1st(only_rsi_columns = FALSE) -cephalosporins_2nd(only_rsi_columns = NULL) +cephalosporins_2nd(only_rsi_columns = FALSE) -cephalosporins_3rd(only_rsi_columns = NULL) +cephalosporins_3rd(only_rsi_columns = FALSE) -cephalosporins_4th(only_rsi_columns = NULL) +cephalosporins_4th(only_rsi_columns = FALSE) -cephalosporins_5th(only_rsi_columns = NULL) +cephalosporins_5th(only_rsi_columns = FALSE) -fluoroquinolones(only_rsi_columns = NULL) +fluoroquinolones(only_rsi_columns = FALSE) -glycopeptides(only_rsi_columns = NULL) +glycopeptides(only_rsi_columns = FALSE) -macrolides(only_rsi_columns = NULL) +macrolides(only_rsi_columns = FALSE) -penicillins(only_rsi_columns = NULL) +oxazolidinones(only_rsi_columns = FALSE) -tetracyclines(only_rsi_columns = NULL)+penicillins(only_rsi_columns = FALSE) + +tetracyclines(only_rsi_columns = FALSE)Arguments
@@ -281,7 +283,7 @@
diff --git a/docs/reference/antibiotics.html b/docs/reference/antibiotics.html index 65c4d12ec..0e97a4ee4 100644 --- a/docs/reference/antibiotics.html +++ b/docs/reference/antibiotics.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/as.ab.html b/docs/reference/as.ab.html index 09f5fd459..ecd7947a9 100644 --- a/docs/reference/as.ab.html +++ b/docs/reference/as.ab.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/as.disk.html b/docs/reference/as.disk.html index 2db882761..14d40449f 100644 --- a/docs/reference/as.disk.html +++ b/docs/reference/as.disk.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/as.mic.html b/docs/reference/as.mic.html index b76622bed..3fd49dd12 100644 --- a/docs/reference/as.mic.html +++ b/docs/reference/as.mic.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/as.mo.html b/docs/reference/as.mo.html index 5d0e34b84..01cb0fedb 100644 --- a/docs/reference/as.mo.html +++ b/docs/reference/as.mo.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/as.rsi.html b/docs/reference/as.rsi.html index 15b8497da..11a37fa6e 100644 --- a/docs/reference/as.rsi.html +++ b/docs/reference/as.rsi.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/atc_online.html b/docs/reference/atc_online.html index fd999c68d..7c4b9bab3 100644 --- a/docs/reference/atc_online.html +++ b/docs/reference/atc_online.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/availability.html b/docs/reference/availability.html index 10d5be471..e05e8c7f4 100644 --- a/docs/reference/availability.html +++ b/docs/reference/availability.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/bug_drug_combinations.html b/docs/reference/bug_drug_combinations.html index 65c3ba202..b62ad5569 100644 --- a/docs/reference/bug_drug_combinations.html +++ b/docs/reference/bug_drug_combinations.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/catalogue_of_life.html b/docs/reference/catalogue_of_life.html index 2faa0041d..878469511 100644 --- a/docs/reference/catalogue_of_life.html +++ b/docs/reference/catalogue_of_life.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/catalogue_of_life_version.html b/docs/reference/catalogue_of_life_version.html index d7391b4e5..a1477fbdc 100644 --- a/docs/reference/catalogue_of_life_version.html +++ b/docs/reference/catalogue_of_life_version.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/count.html b/docs/reference/count.html index 38b20baa3..519aea1a2 100644 --- a/docs/reference/count.html +++ b/docs/reference/count.html @@ -83,7 +83,7 @@ count_resistant() should be used to count resistant isolates, count_susceptible( diff --git a/docs/reference/dosage.html b/docs/reference/dosage.html index c4d9dd1b9..73559e2f2 100644 --- a/docs/reference/dosage.html +++ b/docs/reference/dosage.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/eucast_rules.html b/docs/reference/eucast_rules.html index 0a252aa06..042193fca 100644 --- a/docs/reference/eucast_rules.html +++ b/docs/reference/eucast_rules.html @@ -83,7 +83,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied @@ -253,7 +253,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied version_breakpoints = 11, version_expertrules = 3.2, ampc_cephalosporin_resistance = NA, - only_rsi_columns = any(is.rsi(x)), + only_rsi_columns = FALSE, ... ) @@ -296,7 +296,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are appliedonly_rsi_columns -+ a logical to indicate whether only columns of class
<rsi>
must be selected. If set toNULL
(default), it will beTRUE
if any column of the data was transformed to class<rsi>
on beforehand, andFALSE
otherwise.a logical to indicate whether only columns of class
<rsi>
must be selected (defaults toFALSE
)only_rsi_columns -+ a logical to indicate whether only antibiotic columns must be detected that were transformed to class
<rsi>
on beforehand. Defaults toTRUE
if any column ofx
is of class<rsi>
.a logical to indicate whether only antibiotic columns must be detected that were transformed to class
<rsi>
on beforehand (defaults toFALSE
)... diff --git a/docs/reference/example_isolates.html b/docs/reference/example_isolates.html index af3c64dc7..3f28e7450 100644 --- a/docs/reference/example_isolates.html +++ b/docs/reference/example_isolates.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/example_isolates_unclean.html b/docs/reference/example_isolates_unclean.html index 8a73aeae7..312e4e9d2 100644 --- a/docs/reference/example_isolates_unclean.html +++ b/docs/reference/example_isolates_unclean.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/filter_ab_class.html b/docs/reference/filter_ab_class.html index 2095cb914..b113c9b1b 100644 --- a/docs/reference/filter_ab_class.html +++ b/docs/reference/filter_ab_class.html @@ -82,7 +82,7 @@ @@ -247,35 +247,121 @@ ab_class, result = NULL, scope = "any", - only_rsi_columns = any(is.rsi(x)), + only_rsi_columns = FALSE, ... ) -filter_aminoglycosides(x, result = NULL, scope = "any", ...) +filter_aminoglycosides( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) -filter_carbapenems(x, result = NULL, scope = "any", ...) +filter_carbapenems( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) -filter_cephalosporins(x, result = NULL, scope = "any", ...) +filter_cephalosporins( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) -filter_1st_cephalosporins(x, result = NULL, scope = "any", ...) +filter_1st_cephalosporins( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) -filter_2nd_cephalosporins(x, result = NULL, scope = "any", ...) +filter_2nd_cephalosporins( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) -filter_3rd_cephalosporins(x, result = NULL, scope = "any", ...) +filter_3rd_cephalosporins( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) -filter_4th_cephalosporins(x, result = NULL, scope = "any", ...) +filter_4th_cephalosporins( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) -filter_5th_cephalosporins(x, result = NULL, scope = "any", ...) +filter_5th_cephalosporins( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) -filter_fluoroquinolones(x, result = NULL, scope = "any", ...) +filter_fluoroquinolones( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) -filter_glycopeptides(x, result = NULL, scope = "any", ...) +filter_glycopeptides( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) -filter_macrolides(x, result = NULL, scope = "any", ...) +filter_macrolides( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) -filter_penicillins(x, result = NULL, scope = "any", ...) +filter_oxazolidinones( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) -filter_tetracyclines(x, result = NULL, scope = "any", ...) +filter_penicillins( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) + +filter_tetracyclines( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +)Arguments
@@ -298,7 +384,7 @@
diff --git a/docs/reference/index.html b/docs/reference/index.html index 59740f863..c08f18296 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -81,7 +81,7 @@ @@ -526,13 +526,13 @@only_rsi_columns -+ a logical to indicate whether only columns must be included that were transformed to class
<rsi>
on beforehand. Defaults toTRUE
if any column ofx
is of class<rsi>
.a logical to indicate whether only columns must be included that were transformed to class
<rsi>
on beforehand (defaults toFALSE
)... diff --git a/docs/reference/first_isolate.html b/docs/reference/first_isolate.html index 813aaab05..b1bc7ee95 100644 --- a/docs/reference/first_isolate.html +++ b/docs/reference/first_isolate.html @@ -82,7 +82,7 @@ @@ -243,7 +243,7 @@first_isolate( - x, + x = NULL, col_date = NULL, col_patient_id = NULL, col_mo = NULL, @@ -264,7 +264,7 @@ ) filter_first_isolate( - x, + x = NULL, col_date = NULL, col_patient_id = NULL, col_mo = NULL, @@ -272,7 +272,7 @@ ) filter_first_weighted_isolate( - x, + x = NULL, col_date = NULL, col_patient_id = NULL, col_mo = NULL, @@ -285,7 +285,7 @@x -+ a data.frame containing isolates. Can be left blank for automatic determination.
a data.frame containing isolates. Can be left blank for automatic determination, see Examples.
col_date @@ -399,7 +399,7 @@Using
type = "keyantibiotics"
and argumentignore_I
Any difference from S to R (or vice versa) will (re)select an isolate as a first weighted isolate. With
ignore_I = FALSE
, also differences from I to S|R (or vice versa) will lead to this. This is a reliable method and 30-35 times faster than method 2. Read more about this in thekey_antibiotics()
function.+ Using
-type = "points"
and argumentpoints_threshold
A difference from I to S|R (or vice versa) means 0.5 points, a difference from S to R (or vice versa) means 1 point. When the sum of points exceeds
points_threshold
, which default to2
, an isolate will be (re)selected as a first weighted isolate.A difference from I to S|R (or vice versa) means 0.5 points, a difference from S to R (or vice versa) means 1 point. When the sum of points exceeds
points_threshold
, which defaults to2
, an isolate will be (re)selected as a first weighted isolate.Stable Lifecycle
@@ -422,10 +422,12 @@ The lifecycle of this function is stable# `example_isolates` is a data set available in the AMR package. # See ?example_isolates. -# basic filtering on first isolates -example_isolates[first_isolate(), ] +example_isolates[first_isolate(example_isolates), ] # \donttest{ +# faster way, only works in R 3.2 and later: +example_isolates[first_isolate(), ] + # get all first Gram-negatives example_isolates[which(first_isolate() & mo_is_gram_negative()), ] diff --git a/docs/reference/g.test.html b/docs/reference/g.test.html index aac8fd026..a4345ea9d 100644 --- a/docs/reference/g.test.html +++ b/docs/reference/g.test.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/get_episode.html b/docs/reference/get_episode.html index 35e72b5a9..15ccb3430 100644 --- a/docs/reference/get_episode.html +++ b/docs/reference/get_episode.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/ggplot_rsi.html b/docs/reference/ggplot_rsi.html index 709ececb1..c5319d89f 100644 --- a/docs/reference/ggplot_rsi.html +++ b/docs/reference/ggplot_rsi.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/guess_ab_col.html b/docs/reference/guess_ab_col.html index 8bac09011..97b2edce0 100644 --- a/docs/reference/guess_ab_col.html +++ b/docs/reference/guess_ab_col.html @@ -82,7 +82,7 @@ @@ -246,7 +246,7 @@ x = NULL, search_string = NULL, verbose = FALSE, - only_rsi_columns = any(is.rsi(x)) + only_rsi_columns = FALSE )Arguments
@@ -266,7 +266,7 @@only_rsi_columns -+ a logical to indicate whether only antibiotic columns must be detected that were transformed to class
<rsi>
on beforehand. Defaults toTRUE
if any column ofx
is of class<rsi>
.a logical to indicate whether only antibiotic columns must be detected that were transformed to class
<rsi>
on beforehand (defaults toFALSE
)- +
ab_class()
aminoglycosides()
carbapenems()
cephalosporins()
cephalosporins_1st()
cephalosporins_2nd()
cephalosporins_3rd()
cephalosporins_4th()
cephalosporins_5th()
fluoroquinolones()
glycopeptides()
macrolides()
penicillins()
tetracyclines()
ab_class()
aminoglycosides()
carbapenems()
cephalosporins()
cephalosporins_1st()
cephalosporins_2nd()
cephalosporins_3rd()
cephalosporins_4th()
cephalosporins_5th()
fluoroquinolones()
glycopeptides()
macrolides()
oxazolidinones()
penicillins()
tetracyclines()
Antibiotic Class Selectors
- +
filter_ab_class()
filter_aminoglycosides()
filter_carbapenems()
filter_cephalosporins()
filter_1st_cephalosporins()
filter_2nd_cephalosporins()
filter_3rd_cephalosporins()
filter_4th_cephalosporins()
filter_5th_cephalosporins()
filter_fluoroquinolones()
filter_glycopeptides()
filter_macrolides()
filter_penicillins()
filter_tetracyclines()
filter_ab_class()
filter_aminoglycosides()
filter_carbapenems()
filter_cephalosporins()
filter_1st_cephalosporins()
filter_2nd_cephalosporins()
filter_3rd_cephalosporins()
filter_4th_cephalosporins()
filter_5th_cephalosporins()
filter_fluoroquinolones()
filter_glycopeptides()
filter_macrolides()
filter_oxazolidinones()
filter_penicillins()
filter_tetracyclines()
Filter Isolates on Result in Antimicrobial Class
diff --git a/docs/reference/intrinsic_resistant.html b/docs/reference/intrinsic_resistant.html index e1b79c5ba..c60cdb351 100644 --- a/docs/reference/intrinsic_resistant.html +++ b/docs/reference/intrinsic_resistant.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/isolate_identifier.html b/docs/reference/isolate_identifier.html index 0b0a9ff29..602a3dc59 100644 --- a/docs/reference/isolate_identifier.html +++ b/docs/reference/isolate_identifier.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/join.html b/docs/reference/join.html index c7fb67cce..9ff06ea1d 100644 --- a/docs/reference/join.html +++ b/docs/reference/join.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/key_antibiotics.html b/docs/reference/key_antibiotics.html index a2e97fc09..d43042cc4 100644 --- a/docs/reference/key_antibiotics.html +++ b/docs/reference/key_antibiotics.html @@ -82,7 +82,7 @@ @@ -243,7 +243,7 @@key_antibiotics( - x, + x = NULL, col_mo = NULL, universal_1 = guess_ab_col(x, "amoxicillin"), universal_2 = guess_ab_col(x, "amoxicillin/clavulanic acid"), @@ -380,7 +380,7 @@ The lifecycle of this function is stableUsing
type = "keyantibiotics"
and argumentignore_I
Any difference from S to R (or vice versa) will (re)select an isolate as a first weighted isolate. With
ignore_I = FALSE
, also differences from I to S|R (or vice versa) will lead to this. This is a reliable method and 30-35 times faster than method 2. Read more about this in thekey_antibiotics()
function.+ Using
-type = "points"
and argumentpoints_threshold
A difference from I to S|R (or vice versa) means 0.5 points, a difference from S to R (or vice versa) means 1 point. When the sum of points exceeds
points_threshold
, which default to2
, an isolate will be (re)selected as a first weighted isolate.A difference from I to S|R (or vice versa) means 0.5 points, a difference from S to R (or vice versa) means 1 point. When the sum of points exceeds
points_threshold
, which defaults to2
, an isolate will be (re)selected as a first weighted isolate.Read more on Our Website!
diff --git a/docs/reference/kurtosis.html b/docs/reference/kurtosis.html index d74ca3c1c..1d2e6c7ac 100644 --- a/docs/reference/kurtosis.html +++ b/docs/reference/kurtosis.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/like.html b/docs/reference/like.html index 17097aeca..66999fd54 100644 --- a/docs/reference/like.html +++ b/docs/reference/like.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/mdro.html b/docs/reference/mdro.html index c838960e7..c5e2c9b2c 100644 --- a/docs/reference/mdro.html +++ b/docs/reference/mdro.html @@ -82,7 +82,7 @@ @@ -243,33 +243,28 @@mdro( - x, + x = NULL, guideline = "CMI2012", col_mo = NULL, info = interactive(), pct_required_classes = 0.5, combine_SI = TRUE, verbose = FALSE, - only_rsi_columns = any(is.rsi(x)), + only_rsi_columns = FALSE, ... ) custom_mdro_guideline(..., as_factor = TRUE) -brmo(x, guideline = "BRMO", only_rsi_columns = any(is.rsi(x)), ...) +brmo(x = NULL, only_rsi_columns = FALSE, ...) -mrgn(x, guideline = "MRGN", only_rsi_columns = any(is.rsi(x)), ...) +mrgn(x = NULL, only_rsi_columns = FALSE, ...) -mdr_tb(x, guideline = "TB", only_rsi_columns = any(is.rsi(x)), ...) +mdr_tb(x = NULL, only_rsi_columns = FALSE, ...) -mdr_cmi2012(x, guideline = "CMI2012", only_rsi_columns = any(is.rsi(x)), ...) +mdr_cmi2012(x = NULL, only_rsi_columns = FALSE, ...) -eucast_exceptional_phenotypes( - x, - guideline = "EUCAST", - only_rsi_columns = any(is.rsi(x)), - ... -)+eucast_exceptional_phenotypes(x = NULL, only_rsi_columns = FALSE, ...)Arguments
@@ -304,7 +299,7 @@
only_rsi_columns -+ a logical to indicate whether only antibiotic columns must be detected that were transformed to class
<rsi>
on beforehand. Defaults toTRUE
if any column ofx
is of class<rsi>
.a logical to indicate whether only antibiotic columns must be detected that were transformed to class
<rsi>
on beforehand (defaults toFALSE
)... diff --git a/docs/reference/microorganisms.codes.html b/docs/reference/microorganisms.codes.html index 5407ecad9..7287e7d5d 100644 --- a/docs/reference/microorganisms.codes.html +++ b/docs/reference/microorganisms.codes.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/microorganisms.html b/docs/reference/microorganisms.html index 8b5ac3fcf..dae989b19 100644 --- a/docs/reference/microorganisms.html +++ b/docs/reference/microorganisms.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/microorganisms.old.html b/docs/reference/microorganisms.old.html index 00c102186..53fed7f3a 100644 --- a/docs/reference/microorganisms.old.html +++ b/docs/reference/microorganisms.old.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/mo_matching_score.html b/docs/reference/mo_matching_score.html index 329388e4f..c49afc362 100644 --- a/docs/reference/mo_matching_score.html +++ b/docs/reference/mo_matching_score.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/mo_property.html b/docs/reference/mo_property.html index 46c08ec6f..42278533b 100644 --- a/docs/reference/mo_property.html +++ b/docs/reference/mo_property.html @@ -82,7 +82,7 @@ @@ -349,9 +349,9 @@The short name -
mo_shortname()
- almost always returns the first character of the genus and the full species, like"E. coli"
. Exceptions are abbreviations of staphylococci (such as "CoNS", Coagulase-Negative Staphylococci) and beta-haemolytic streptococci (such as "GBS", Group B Streptococci). Please bear in mind that e.g. E. coli could mean Escherichia coli (kingdom of Bacteria) as well as Entamoeba coli (kingdom of Protozoa). Returning to the full name will be done usingas.mo()
internally, giving priority to bacteria and human pathogens, i.e."E. coli"
will be considered Escherichia coli. In other words,mo_fullname(mo_shortname("Entamoeba coli"))
returns"Escherichia coli"
.Since the top-level of the taxonomy is sometimes referred to as 'kingdom' and sometimes as 'domain', the functions
mo_kingdom()
andmo_domain()
return the exact same results.The Gram stain -
-mo_gramstain()
- will be determined based on the taxonomic kingdom and phylum. According to Cavalier-Smith (2002, PMID 11837318), who defined subkingdoms Negibacteria and Posibacteria, only these phyla are Posibacteria: Actinobacteria, Chloroflexi, Firmicutes and Tenericutes. These bacteria are considered Gram-positive - all other bacteria are considered Gram-negative. Species outside the kingdom of Bacteria will return a valueNA
. Functionsmo_is_gram_negative()
andmo_is_gram_positive()
always returnTRUE
orFALSE
(except when the input isNA
or the MO code isUNKNOWN
), thus always returnFALSE
for species outside the taxonomic kingdom of Bacteria.Determination of yeasts -
-mo_is_yeast()
- will be based on the taxonomic phylum, class and order. Budding yeasts are true fungi of the phylum Ascomycetes, class Saccharomycetes (also called Hemiascomycetes). The true yeasts are separated into one main order Saccharomycetales. For all microorganisms that are in one of those two groups, the function will returnTRUE
. It returnsFALSE
for all other taxonomic entries.Intrinsic resistance -
-mo_is_intrinsic_resistant()
- will be determined based on the intrinsic_resistant data set, which is based on 'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.2 (2020). Themo_is_intrinsic_resistant()
can be vectorised over argumentsx
(input for microorganisms) and overab
(input for antibiotics).All output will be translated where possible.
+Determination of yeasts -
+mo_is_yeast()
- will be based on the taxonomic kingdom and class. Budding yeasts are fungi of the phylum Ascomycetes, class Saccharomycetes (also called Hemiascomycetes). True yeasts are aggregated into the underlying order Saccharomycetales. Thus, for all microorganisms that are fungi and member of the taxonomic class Saccharomycetes, the function will returnTRUE
. It returnsFALSE
otherwise (except when the input isNA
or the MO code isUNKNOWN
).Intrinsic resistance -
+mo_is_intrinsic_resistant()
- will be determined based on the intrinsic_resistant data set, which is based on 'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.2 (2020). Themo_is_intrinsic_resistant()
functions can be vectorised over argumentsx
(input for microorganisms) and overab
(input for antibiotics).All output will be translated where possible.
The function
mo_url()
will return the direct URL to the online database entry, which also shows the scientific reference of the concerned species.Stable Lifecycle
diff --git a/docs/reference/mo_source.html b/docs/reference/mo_source.html index 90eaae799..2030f5132 100644 --- a/docs/reference/mo_source.html +++ b/docs/reference/mo_source.html @@ -83,7 +83,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p diff --git a/docs/reference/pca.html b/docs/reference/pca.html index 1b5fced12..06ac67fcc 100644 --- a/docs/reference/pca.html +++ b/docs/reference/pca.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/plot.html b/docs/reference/plot.html index 1857ffd6e..b71efe64e 100644 --- a/docs/reference/plot.html +++ b/docs/reference/plot.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/proportion.html b/docs/reference/proportion.html index 62590c087..3424c0dd2 100644 --- a/docs/reference/proportion.html +++ b/docs/reference/proportion.html @@ -83,7 +83,7 @@ resistance() should be used to calculate resistance, susceptibility() should be diff --git a/docs/reference/random.html b/docs/reference/random.html index 6bfa9f6df..f9c48cdd1 100644 --- a/docs/reference/random.html +++ b/docs/reference/random.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/resistance_predict.html b/docs/reference/resistance_predict.html index 3f1e5b431..9728ccb0c 100644 --- a/docs/reference/resistance_predict.html +++ b/docs/reference/resistance_predict.html @@ -82,7 +82,7 @@ @@ -287,7 +287,7 @@x -+ a data.frame containing isolates. Can be left blank for automatic determination.
a data.frame containing isolates. Can be left blank for automatic determination, see Examples.
col_ab diff --git a/docs/reference/rsi_translation.html b/docs/reference/rsi_translation.html index a37725c44..713dcef45 100644 --- a/docs/reference/rsi_translation.html +++ b/docs/reference/rsi_translation.html @@ -82,7 +82,7 @@ diff --git a/docs/reference/skewness.html b/docs/reference/skewness.html index d84086dd5..65d21c0d6 100644 --- a/docs/reference/skewness.html +++ b/docs/reference/skewness.html @@ -83,7 +83,7 @@ When negative ('left-skewed'): the left tail is longer; the mass of the distribu diff --git a/docs/reference/translate.html b/docs/reference/translate.html index 16209a9bb..372f3cc4f 100644 --- a/docs/reference/translate.html +++ b/docs/reference/translate.html @@ -82,7 +82,7 @@ diff --git a/docs/survey.html b/docs/survey.html index 0ba3b1165..903490319 100644 --- a/docs/survey.html +++ b/docs/survey.html @@ -81,7 +81,7 @@ diff --git a/index.md b/index.md index 852bfefee..52e24b552 100644 --- a/index.md +++ b/index.md @@ -1,6 +1,6 @@ # `AMR` (for R)-*Note: the rules of 'EUCAST Clinical Breakpoints v11.0 (2021)' will be added in the next release, to be expected in February/March 2021.* +*Note: the rules of 'EUCAST Clinical Breakpoints v11.0 (2021)' are implemented in [the latest beta version](./#latest-development-version), awaiting the next stable release (expected end of February)* > **PLEASE TAKE PART IN OUR SURVEY!** > Since you are one of our users, we would like to know how you use the package and what it brought you or your organisation. **If you have a minute, please [anonymously fill in this short questionnaire](./survey.html)**. Your valuable input will help to improve the package and its functionalities. You can answer the open questions in either English, Spanish, French, Dutch, or German. Thank you very much in advance! @@ -39,9 +39,9 @@ example_isolates %>% #> NOTE: Using column 'mo' as input for mo_is_intrinsic_resistant() #> NOTE: Determining intrinsic resistance based on 'EUCAST Expert Rules' and #> 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.2 (2020). -#> Selecting aminoglycosides: 'AMK' (amikacin), 'GEN' (gentamicin), -#> 'KAN' (kanamycin), 'TOB' (tobramycin) -#> Selecting carbapenems: 'IPM' (imipenem), 'MEM' (meropenem) +#> Selecting aminoglycosides: columns 'AMK' (amikacin), 'GEN' (gentamicin), +#> 'KAN' (kanamycin) and 'TOB' (tobramycin) +#> Selecting carbapenems: columns 'IPM' (imipenem) and 'MEM' (meropenem) ``` With only having defined a row filter on Gram-negative bacteria with intrinsic resistance to cefotaxime (`mo_is_gram_negative()` and `mo_is_intrinsic_resistant()`) and a column selection on two antibiotic groups (`aminoglycosides()` and `carbapenems()`), the reference data about [all microorganisms](./reference/microorganisms.html) and [all antibiotics](./reference/antibiotics.html) in the `AMR` package make sure you get what you meant: diff --git a/man/ab_property.Rd b/man/ab_property.Rd index fa3a98552..23c68f3b4 100644 --- a/man/ab_property.Rd +++ b/man/ab_property.Rd @@ -72,7 +72,7 @@ ab_property(x, property = "name", language = get_locale(), ...) Use these functions to return a specific property of an antibiotic from the \link{antibiotics} data set. All input values will be evaluated internally with \code{\link[=as.ab]{as.ab()}}. } \details{ -All output will be \link{translate}d where possible. +All output \link[=translate]{will be translated} where possible. The function \code{\link[=ab_url]{ab_url()}} will return the direct URL to the official WHO website. A warning will be returned if the required ATC code is not available. } diff --git a/man/antibiotic_class_selectors.Rd b/man/antibiotic_class_selectors.Rd index f220e5fbf..8c3097eb3 100644 --- a/man/antibiotic_class_selectors.Rd +++ b/man/antibiotic_class_selectors.Rd @@ -14,42 +14,45 @@ \alias{fluoroquinolones} \alias{glycopeptides} \alias{macrolides} +\alias{oxazolidinones} \alias{penicillins} \alias{tetracyclines} \title{Antibiotic Class Selectors} \usage{ -ab_class(ab_class, only_rsi_columns = NULL) +ab_class(ab_class, only_rsi_columns = FALSE) -aminoglycosides(only_rsi_columns = NULL) +aminoglycosides(only_rsi_columns = FALSE) -carbapenems(only_rsi_columns = NULL) +carbapenems(only_rsi_columns = FALSE) -cephalosporins(only_rsi_columns = NULL) +cephalosporins(only_rsi_columns = FALSE) -cephalosporins_1st(only_rsi_columns = NULL) +cephalosporins_1st(only_rsi_columns = FALSE) -cephalosporins_2nd(only_rsi_columns = NULL) +cephalosporins_2nd(only_rsi_columns = FALSE) -cephalosporins_3rd(only_rsi_columns = NULL) +cephalosporins_3rd(only_rsi_columns = FALSE) -cephalosporins_4th(only_rsi_columns = NULL) +cephalosporins_4th(only_rsi_columns = FALSE) -cephalosporins_5th(only_rsi_columns = NULL) +cephalosporins_5th(only_rsi_columns = FALSE) -fluoroquinolones(only_rsi_columns = NULL) +fluoroquinolones(only_rsi_columns = FALSE) -glycopeptides(only_rsi_columns = NULL) +glycopeptides(only_rsi_columns = FALSE) -macrolides(only_rsi_columns = NULL) +macrolides(only_rsi_columns = FALSE) -penicillins(only_rsi_columns = NULL) +oxazolidinones(only_rsi_columns = FALSE) -tetracyclines(only_rsi_columns = NULL) +penicillins(only_rsi_columns = FALSE) + +tetracyclines(only_rsi_columns = FALSE) } \arguments{ \item{ab_class}{an antimicrobial class, like \code{"carbapenems"}. The columns \code{group}, \code{atc_group1} and \code{atc_group2} of the \link{antibiotics} data set will be searched (case-insensitive) for this value.} -\item{only_rsi_columns}{a logical to indicate whether only columns of class \href{[rsi]}{\verb{
}} must be selected. If set to \code{NULL} (default), it will be \code{TRUE} if any column of the data was \href{[rsi]}{transformed to class \verb{ }} on beforehand, and \code{FALSE} otherwise.} +\item{only_rsi_columns}{a logical to indicate whether only columns of class \href{[rsi]}{\verb{ }} must be selected (defaults to \code{FALSE})} } \description{ These functions help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations. \strong{\Sexpr{ifelse(as.double(R.Version()$major) + (as.double(R.Version()$minor) / 10) < 3.2, paste0("NOTE: THESE FUNCTIONS DO NOT WORK ON YOUR CURRENT R VERSION. These functions require R version 3.2 or later - you have ", R.version.string, "."), "")}} diff --git a/man/eucast_rules.Rd b/man/eucast_rules.Rd index 138d43452..a0dc008f3 100644 --- a/man/eucast_rules.Rd +++ b/man/eucast_rules.Rd @@ -26,7 +26,7 @@ eucast_rules( version_breakpoints = 11, version_expertrules = 3.2, ampc_cephalosporin_resistance = NA, - only_rsi_columns = any(is.rsi(x)), + only_rsi_columns = FALSE, ... ) @@ -49,7 +49,7 @@ eucast_dosage(ab, administration = "iv", version_breakpoints = 11) \item{ampc_cephalosporin_resistance}{a character value that should be applied for AmpC de-repressed cephalosporin-resistant mutants, defaults to \code{NA}. Currently only works when \code{version_expertrules} is \code{3.2}; '\emph{EUCAST Expert Rules v3.2 on Enterobacterales}' states that results of cefotaxime, ceftriaxone and ceftazidime should be reported with a note, or results should be suppressed (emptied) for these agents. A value of \code{NA} for this argument will remove results for these agents, while e.g. a value of \code{"R"} will make the results for these agents resistant. Use \code{NULL} to not alter the results for AmpC de-repressed cephalosporin-resistant mutants. \cr For \emph{EUCAST Expert Rules} v3.2, this rule applies to: \emph{Citrobacter braakii}, \emph{Citrobacter freundii}, \emph{Citrobacter gillenii}, \emph{Citrobacter murliniae}, \emph{Citrobacter rodenticum}, \emph{Citrobacter sedlakii}, \emph{Citrobacter werkmanii}, \emph{Citrobacter youngae}, \emph{Enterobacter}, \emph{Hafnia alvei}, \emph{Klebsiella aerogenes}, \emph{Morganella morganii}, \emph{Providencia} and \emph{Serratia}.} -\item{only_rsi_columns}{a logical to indicate whether only antibiotic columns must be detected that were \href{[rsi]}{transformed to class \verb{ }} on beforehand. Defaults to \code{TRUE} if any column of \code{x} is of class \verb{ }.} +\item{only_rsi_columns}{a logical to indicate whether only antibiotic columns must be detected that were \href{[rsi]}{transformed to class \verb{ }} on beforehand (defaults to \code{FALSE})} \item{...}{column name of an antibiotic, see section \emph{Antibiotics} below} diff --git a/man/filter_ab_class.Rd b/man/filter_ab_class.Rd index 80d2a381c..2d5240df6 100644 --- a/man/filter_ab_class.Rd +++ b/man/filter_ab_class.Rd @@ -13,6 +13,7 @@ \alias{filter_fluoroquinolones} \alias{filter_glycopeptides} \alias{filter_macrolides} +\alias{filter_oxazolidinones} \alias{filter_penicillins} \alias{filter_tetracyclines} \title{Filter Isolates on Result in Antimicrobial Class} @@ -22,35 +23,121 @@ filter_ab_class( ab_class, result = NULL, scope = "any", - only_rsi_columns = any(is.rsi(x)), + only_rsi_columns = FALSE, ... ) -filter_aminoglycosides(x, result = NULL, scope = "any", ...) +filter_aminoglycosides( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) -filter_carbapenems(x, result = NULL, scope = "any", ...) +filter_carbapenems( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) -filter_cephalosporins(x, result = NULL, scope = "any", ...) +filter_cephalosporins( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) -filter_1st_cephalosporins(x, result = NULL, scope = "any", ...) +filter_1st_cephalosporins( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) -filter_2nd_cephalosporins(x, result = NULL, scope = "any", ...) +filter_2nd_cephalosporins( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) -filter_3rd_cephalosporins(x, result = NULL, scope = "any", ...) +filter_3rd_cephalosporins( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) -filter_4th_cephalosporins(x, result = NULL, scope = "any", ...) +filter_4th_cephalosporins( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) -filter_5th_cephalosporins(x, result = NULL, scope = "any", ...) +filter_5th_cephalosporins( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) -filter_fluoroquinolones(x, result = NULL, scope = "any", ...) +filter_fluoroquinolones( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) -filter_glycopeptides(x, result = NULL, scope = "any", ...) +filter_glycopeptides( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) -filter_macrolides(x, result = NULL, scope = "any", ...) +filter_macrolides( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) -filter_penicillins(x, result = NULL, scope = "any", ...) +filter_oxazolidinones( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) -filter_tetracyclines(x, result = NULL, scope = "any", ...) +filter_penicillins( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) + +filter_tetracyclines( + x, + result = NULL, + scope = "any", + only_rsi_columns = FALSE, + ... +) } \arguments{ \item{x}{a data set} @@ -61,7 +148,7 @@ filter_tetracyclines(x, result = NULL, scope = "any", ...) \item{scope}{the scope to check which variables to check, can be \code{"any"} (default) or \code{"all"}} -\item{only_rsi_columns}{a logical to indicate whether only columns must be included that were \href{[rsi]}{transformed to class \verb{ }} on beforehand. Defaults to \code{TRUE} if any column of \code{x} is of class \verb{ }.} +\item{only_rsi_columns}{a logical to indicate whether only columns must be included that were \href{[rsi]}{transformed to class \verb{ }} on beforehand (defaults to \code{FALSE})} \item{...}{arguments passed on to \code{\link[=filter_ab_class]{filter_ab_class()}}} } diff --git a/man/first_isolate.Rd b/man/first_isolate.Rd index 5fb0a3095..53c572cb0 100755 --- a/man/first_isolate.Rd +++ b/man/first_isolate.Rd @@ -12,7 +12,7 @@ Methodology of this function is strictly based on: } \usage{ first_isolate( - x, + x = NULL, col_date = NULL, col_patient_id = NULL, col_mo = NULL, @@ -33,7 +33,7 @@ first_isolate( ) filter_first_isolate( - x, + x = NULL, col_date = NULL, col_patient_id = NULL, col_mo = NULL, @@ -41,7 +41,7 @@ filter_first_isolate( ) filter_first_weighted_isolate( - x, + x = NULL, col_date = NULL, col_patient_id = NULL, col_mo = NULL, @@ -50,7 +50,7 @@ filter_first_weighted_isolate( ) } \arguments{ -\item{x}{a \link{data.frame} containing isolates. Can be left blank for automatic determination.} +\item{x}{a \link{data.frame} containing isolates. Can be left blank for automatic determination, see \emph{Examples}.} \item{col_date}{column name of the result date (or date that is was received on the lab), defaults to the first column with a date class} @@ -130,7 +130,7 @@ There are two ways to determine whether isolates can be included as first weight Any difference from S to R (or vice versa) will (re)select an isolate as a first weighted isolate. With \code{ignore_I = FALSE}, also differences from I to S|R (or vice versa) will lead to this. This is a reliable method and 30-35 times faster than method 2. Read more about this in the \code{\link[=key_antibiotics]{key_antibiotics()}} function. \item Using \code{type = "points"} and argument \code{points_threshold} -A difference from I to S|R (or vice versa) means 0.5 points, a difference from S to R (or vice versa) means 1 point. When the sum of points exceeds \code{points_threshold}, which default to \code{2}, an isolate will be (re)selected as a first weighted isolate. +A difference from I to S|R (or vice versa) means 0.5 points, a difference from S to R (or vice versa) means 1 point. When the sum of points exceeds \code{points_threshold}, which defaults to \code{2}, an isolate will be (re)selected as a first weighted isolate. } } @@ -151,10 +151,12 @@ On our website \url{https://msberends.github.io/AMR/} you can find \href{https:/ # `example_isolates` is a data set available in the AMR package. # See ?example_isolates. -# basic filtering on first isolates -example_isolates[first_isolate(), ] +example_isolates[first_isolate(example_isolates), ] \donttest{ +# faster way, only works in R 3.2 and later: +example_isolates[first_isolate(), ] + # get all first Gram-negatives example_isolates[which(first_isolate() & mo_is_gram_negative()), ] diff --git a/man/guess_ab_col.Rd b/man/guess_ab_col.Rd index ef2a14aba..a566673e6 100644 --- a/man/guess_ab_col.Rd +++ b/man/guess_ab_col.Rd @@ -8,7 +8,7 @@ guess_ab_col( x = NULL, search_string = NULL, verbose = FALSE, - only_rsi_columns = any(is.rsi(x)) + only_rsi_columns = FALSE ) } \arguments{ @@ -18,7 +18,7 @@ guess_ab_col( \item{verbose}{a logical to indicate whether additional info should be printed} -\item{only_rsi_columns}{a logical to indicate whether only antibiotic columns must be detected that were \href{[rsi]}{transformed to class \verb{ }} on beforehand. Defaults to \code{TRUE} if any column of \code{x} is of class \verb{ }.} +\item{only_rsi_columns}{a logical to indicate whether only antibiotic columns must be detected that were \href{[rsi]}{transformed to class \verb{ }} on beforehand (defaults to \code{FALSE})} } \value{ A column name of \code{x}, or \code{NULL} when no result is found. diff --git a/man/key_antibiotics.Rd b/man/key_antibiotics.Rd index 79bac695a..c48da92bb 100755 --- a/man/key_antibiotics.Rd +++ b/man/key_antibiotics.Rd @@ -6,7 +6,7 @@ \title{Key Antibiotics for First (Weighted) Isolates} \usage{ key_antibiotics( - x, + x = NULL, col_mo = NULL, universal_1 = guess_ab_col(x, "amoxicillin"), universal_2 = guess_ab_col(x, "amoxicillin/clavulanic acid"), @@ -125,7 +125,7 @@ There are two ways to determine whether isolates can be included as first weight Any difference from S to R (or vice versa) will (re)select an isolate as a first weighted isolate. With \code{ignore_I = FALSE}, also differences from I to S|R (or vice versa) will lead to this. This is a reliable method and 30-35 times faster than method 2. Read more about this in the \code{\link[=key_antibiotics]{key_antibiotics()}} function. \item Using \code{type = "points"} and argument \code{points_threshold} -A difference from I to S|R (or vice versa) means 0.5 points, a difference from S to R (or vice versa) means 1 point. When the sum of points exceeds \code{points_threshold}, which default to \code{2}, an isolate will be (re)selected as a first weighted isolate. +A difference from I to S|R (or vice versa) means 0.5 points, a difference from S to R (or vice versa) means 1 point. When the sum of points exceeds \code{points_threshold}, which defaults to \code{2}, an isolate will be (re)selected as a first weighted isolate. } } diff --git a/man/mdro.Rd b/man/mdro.Rd index d846ff567..3cb9c2584 100644 --- a/man/mdro.Rd +++ b/man/mdro.Rd @@ -20,33 +20,28 @@ See the supported guidelines above for the list of publications used for this fu } \usage{ mdro( - x, + x = NULL, guideline = "CMI2012", col_mo = NULL, info = interactive(), pct_required_classes = 0.5, combine_SI = TRUE, verbose = FALSE, - only_rsi_columns = any(is.rsi(x)), + only_rsi_columns = FALSE, ... ) custom_mdro_guideline(..., as_factor = TRUE) -brmo(x, guideline = "BRMO", only_rsi_columns = any(is.rsi(x)), ...) +brmo(x = NULL, only_rsi_columns = FALSE, ...) -mrgn(x, guideline = "MRGN", only_rsi_columns = any(is.rsi(x)), ...) +mrgn(x = NULL, only_rsi_columns = FALSE, ...) -mdr_tb(x, guideline = "TB", only_rsi_columns = any(is.rsi(x)), ...) +mdr_tb(x = NULL, only_rsi_columns = FALSE, ...) -mdr_cmi2012(x, guideline = "CMI2012", only_rsi_columns = any(is.rsi(x)), ...) +mdr_cmi2012(x = NULL, only_rsi_columns = FALSE, ...) -eucast_exceptional_phenotypes( - x, - guideline = "EUCAST", - only_rsi_columns = any(is.rsi(x)), - ... -) +eucast_exceptional_phenotypes(x = NULL, only_rsi_columns = FALSE, ...) } \arguments{ \item{x}{a \link{data.frame} with antibiotics columns, like \code{AMX} or \code{amox}. Can be left blank for automatic determination.} @@ -63,7 +58,7 @@ eucast_exceptional_phenotypes( \item{verbose}{a logical to turn Verbose mode on and off (default is off). In Verbose mode, the function does not return the MDRO results, but instead returns a data set in logbook form with extensive info about which isolates would be MDRO-positive, or why they are not.} -\item{only_rsi_columns}{a logical to indicate whether only antibiotic columns must be detected that were \href{[rsi]}{transformed to class \verb{ }} on beforehand. Defaults to \code{TRUE} if any column of \code{x} is of class \verb{ }.} +\item{only_rsi_columns}{a logical to indicate whether only antibiotic columns must be detected that were \href{[rsi]}{transformed to class \verb{ }} on beforehand (defaults to \code{FALSE})} \item{...}{in case of \code{\link[=custom_mdro_guideline]{custom_mdro_guideline()}}: a set of rules, see section \emph{Using Custom Guidelines} below. Otherwise: column name of an antibiotic, see section \emph{Antibiotics} below.} diff --git a/man/mo_property.Rd b/man/mo_property.Rd index c683ad8f0..7f90e6564 100644 --- a/man/mo_property.Rd +++ b/man/mo_property.Rd @@ -126,11 +126,11 @@ Since the top-level of the taxonomy is sometimes referred to as 'kingdom' and so The Gram stain - \code{\link[=mo_gramstain]{mo_gramstain()}} - will be determined based on the taxonomic kingdom and phylum. According to Cavalier-Smith (2002, \href{https://pubmed.ncbi.nlm.nih.gov/11837318}{PMID 11837318}), who defined subkingdoms Negibacteria and Posibacteria, only these phyla are Posibacteria: Actinobacteria, Chloroflexi, Firmicutes and Tenericutes. These bacteria are considered Gram-positive - all other bacteria are considered Gram-negative. Species outside the kingdom of Bacteria will return a value \code{NA}. Functions \code{\link[=mo_is_gram_negative]{mo_is_gram_negative()}} and \code{\link[=mo_is_gram_positive]{mo_is_gram_positive()}} always return \code{TRUE} or \code{FALSE} (except when the input is \code{NA} or the MO code is \code{UNKNOWN}), thus always return \code{FALSE} for species outside the taxonomic kingdom of Bacteria. -Determination of yeasts - \code{\link[=mo_is_yeast]{mo_is_yeast()}} - will be based on the taxonomic phylum, class and order. Budding yeasts are true fungi of the phylum Ascomycetes, class Saccharomycetes (also called Hemiascomycetes). The true yeasts are separated into one main order Saccharomycetales. For all microorganisms that are in one of those two groups, the function will return \code{TRUE}. It returns \code{FALSE} for all other taxonomic entries. +Determination of yeasts - \code{\link[=mo_is_yeast]{mo_is_yeast()}} - will be based on the taxonomic kingdom and class. \emph{Budding yeasts} are fungi of the phylum Ascomycetes, class Saccharomycetes (also called Hemiascomycetes). \emph{True yeasts} are aggregated into the underlying order Saccharomycetales. Thus, for all microorganisms that are fungi and member of the taxonomic class Saccharomycetes, the function will return \code{TRUE}. It returns \code{FALSE} otherwise (except when the input is \code{NA} or the MO code is \code{UNKNOWN}). -Intrinsic resistance - \code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}} - will be determined based on the \link{intrinsic_resistant} data set, which is based on \href{https://www.eucast.org/expert_rules_and_intrinsic_resistance/}{'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.2} (2020). The \code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}} can be vectorised over arguments \code{x} (input for microorganisms) and over \code{ab} (input for antibiotics). +Intrinsic resistance - \code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}} - will be determined based on the \link{intrinsic_resistant} data set, which is based on \href{https://www.eucast.org/expert_rules_and_intrinsic_resistance/}{'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.2} (2020). The \code{\link[=mo_is_intrinsic_resistant]{mo_is_intrinsic_resistant()}} functions can be vectorised over arguments \code{x} (input for microorganisms) and over \code{ab} (input for antibiotics). -All output will be \link{translate}d where possible. +All output \link[=translate]{will be translated} where possible. The function \code{\link[=mo_url]{mo_url()}} will return the direct URL to the online database entry, which also shows the scientific reference of the concerned species. } diff --git a/man/resistance_predict.Rd b/man/resistance_predict.Rd index 36ee1dcb5..d90029a64 100644 --- a/man/resistance_predict.Rd +++ b/man/resistance_predict.Rd @@ -47,7 +47,7 @@ ggplot_rsi_predict( ) } \arguments{ -\item{x}{a \link{data.frame} containing isolates. Can be left blank for automatic determination.} +\item{x}{a \link{data.frame} containing isolates. Can be left blank for automatic determination, see \emph{Examples}.} \item{col_ab}{column name of \code{x} containing antimicrobial interpretations (\code{"R"}, \code{"I"} and \code{"S"})} diff --git a/tests/testthat/test-_misc.R b/tests/testthat/test-_misc.R index 3a89e5f9f..8827ece3a 100755 --- a/tests/testthat/test-_misc.R +++ b/tests/testthat/test-_misc.R @@ -54,3 +54,12 @@ test_that("looking up ab columns works", { expect_warning(get_column_abx(dplyr::rename(example_isolates, thisone = AMX), amox = "thisone", tmp = "thisone", verbose = TRUE)) expect_warning(get_column_abx(dplyr::rename(example_isolates, thisone = AMX), amox = "thisone", tmp = "thisone", verbose = FALSE)) }) + +test_that("looking up ab columns works", { + skip_on_cran() + library(dplyr) + + # we rely on "grouped_tbl" being a class of grouped tibbles, so: + expect_true(is_null_or_grouped_tbl(example_isolates %>% group_by(hospital_id))) + +})