A data set with 455 rows and 14 columns, containing the following column names:
‘ab’, ‘atc’, ‘cid’, ‘name’, ‘group’, ‘atc_group1’, ‘atc_group2’, ‘abbreviations’, ‘synonyms’, ‘oral_ddd’, ‘oral_units’, ‘iv_ddd’, ‘iv_units’, ‘loinc’.
A data set with 456 rows and 14 columns, containing the following column names:
‘ab’, ‘atc’, ‘cid’, ‘name’, ‘group’, ‘atc_group1’, ‘atc_group2’, ‘abbreviations’, ‘synonyms’, ‘oral_ddd’, ‘oral_units’, ‘iv_ddd’, ‘iv_units’, ‘loinc’.
This data set is in R available as antibiotics
, after you load the AMR
package.
It was last updated on 24 September 2020 00:50:35 CEST. Find more info about the structure of this data set here.
+It was last updated on 14 January 2021 16:04:41 CET. Find more info about the structure of this data set here.
Direct download links:
A data set with 18,650 rows and 10 columns, containing the following column names:
‘guideline’, ‘method’, ‘site’, ‘mo’, ‘ab’, ‘ref_tbl’, ‘disk_dose’, ‘breakpoint_S’, ‘breakpoint_R’, ‘uti’.
A data set with 20,486 rows and 10 columns, containing the following column names:
‘guideline’, ‘method’, ‘site’, ‘mo’, ‘ab’, ‘ref_tbl’, ‘disk_dose’, ‘breakpoint_S’, ‘breakpoint_R’, ‘uti’.
This data set is in R available as rsi_translation
, after you load the AMR
package.
It was last updated on 29 July 2020 13:12:34 CEST. Find more info about the structure of this data set here.
+It was last updated on 14 January 2021 16:04:41 CET. Find more info about the structure of this data set here.
Direct download links:
This data set contains interpretation rules for MIC values and disk diffusion diameters. Included guidelines are CLSI (2010-2019) and EUCAST (2011-2020).
+This data set contains interpretation rules for MIC values and disk diffusion diameters. Included guidelines are CLSI (2010-2019) and EUCAST (2011-2021).
A data set with 135 rows and 9 columns, containing the following column names:
‘ab’, ‘name’, ‘type’, ‘dose’, ‘dose_times’, ‘administration’, ‘notes’, ‘original_txt’, ‘eucast_version’.
This data set is in R available as dosage
, after you load the AMR
package.
It was last updated on 14 January 2021 16:04:41 CET. Find more info about the structure of this data set here.
+Direct download links:
+EUCAST breakpoints used in this package are based on the dosages in this data set.
+Currently included dosages in the data set are meant for: ‘EUCAST Clinical Breakpoint Tables’ v11.0 (2021).
+ab | +name | +type | +dose | +dose_times | +administration | +notes | +original_txt | +eucast_version | +
---|---|---|---|---|---|---|---|---|
AMK | +Amikacin | +standard_dosage | +25-30 mg/kg | +1 | +iv | ++ | 25-30 mg/kg x 1 iv | +11 | +
AMX | +Amoxicillin | +high_dosage | +2 g | +6 | +iv | ++ | 2 g x 6 iv | +11 | +
AMX | +Amoxicillin | +standard_dosage | +1 g | +3 | +iv | ++ | 1 g x 3-4 iv | +11 | +
AMX | +Amoxicillin | +high_dosage | +0.75-1 g | +3 | +oral | ++ | 0.75-1 g x 3 oral | +11 | +
AMX | +Amoxicillin | +standard_dosage | +0.5 g | +3 | +oral | ++ | 0.5 g x 3 oral | +11 | +
AMX | +Amoxicillin | +uncomplicated_uti | +0.5 g | +3 | +oral | ++ | 0.5 g x 3 oral | +11 | +
NEWS.md
- mdro(..., verbose = TRUE)
for German guideline (3MGRN and 4MGRN) and P. aeruginosa in Dutch guideline (BRMO)If as.mo()
takes more than 30 seconds, some suggestions will be done to improve speed
Added argument excess
to the kurtosis()
function (defaults to FALSE
), to return the excess kurtosis, defined as the kurtosis minus three.
portion_R()
, portion_S()
and portion_I()
that were deprecated since version 0.9.0 (November 2019) and were replaced with proportion_R()
, proportion_S()
and proportion_I()
Fixed a bug where as.mic()
could not handle dots without a leading zero (like "<=.25
)
p.symbol()
- it was replaced with p_symbol()
as.rsi()
for years 2010-2019 (thanks to Anthony Underwood)dplyr
version 1.0.0rsi
and mic
@@ -791,9 +798,9 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
CITATION
fileclean
to cleaner
, as this package was renamed accordingly upon CRAN requestas.mic()
)lintr
packagemo_shortname()
where species would not be determined correctly%like%
, it will now return the callPercentages will now will rounded more logically (e.g. in freq
function)
crayon
, to support formatted text in the consoletidyr
is now mandatory (went to Import
field) since portion_df
and count_df
rely on itas.rsi
and as.mic
now add the package name and version as attributesREADME.md
with more examplesp_symbol(p, emptychar = " ")-
The lifecycle of this function is retired. A retired function is no longer under active development, and (if appropiate) a better alternative is available. No new arguments will be added, and only the most critical bugs will be fixed. In a future version, this function will be removed.
Principal component analysis for AMR
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this AMR
package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find all download links on our website, which is automatically updated with every code change.
These have become the gold standard for international drug utilisation monitoring and research.
The WHOCC is located in Oslo at the Norwegian Institute of Public Health and funded by the Norwegian government. The European Commission is the executive of the European Union and promotes its general interest.
NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package. See https://www.whocc.no/copyright_disclaimer/.
-R/data.R
WHONET.Rd
AMP_ND10:CIP_EE
28 different antibiotics. You can lookup the abbreviations in the antibiotics data set, or use e.g. ab_name("AMP")
to get the official name immediately. Before analysis, you should transform this to a valid antibiotic class, using as.rsi()
.
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this AMR
package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find all download links on our website, which is automatically updated with every code change.
R/ab_from_text.R
ab_from_text.Rd
With using collapse
, this function will return a character:
df %>% mutate(abx = ab_from_text(clinical_text, collapse = "|"))
The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. Since this function needs wider usage and more extensive testing, you are very welcome to suggest changes at our repository or write us an email (see section 'Contact Us').
R/ab_property.R
ab_property.Rd
a logical to indicate whether the units instead of the DDDs itself must be returned, see Examples
a logical to indicate whether the units instead of the DDDs itself must be returned, see Examples
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.
WHONET 2019 software: http://www.whonet.org/software.html
European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: http://ec.europa.eu/health/documents/community-register/html/atc.htm
-All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this AMR
package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find all download links on our website, which is automatically updated with every code change.
Ages below 0 will be returned as NA
with a warning. Ages above 120 will only give a warning.
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
-values to split x
at, defaults to age groups 0-11, 12-24, 25-54, 55-74 and 75+. See Details.
values to split x
at, defaults to age groups 0-11, 12-24, 25-54, 55-74 and 75+. See Details.
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
-R/ab_class_selectors.R
antibiotic_class_selectors.Rd
All columns will be searched for known antibiotic names, abbreviations, brand names and codes (ATC, EARS-Net, WHO, etc.) in the antibiotics data set. This means that a selector like e.g. aminoglycosides()
will pick up column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc.
+The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
+All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this AMR
package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find all download links on our website, which is automatically updated with every code change.
R/data.R
antibiotics.Rd
These have become the gold standard for international drug utilisation monitoring and research.
The WHOCC is located in Oslo at the Norwegian Institute of Public Health and funded by the Norwegian government. The European Commission is the executive of the European Union and promotes its general interest.
NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package. See https://www.whocc.no/copyright_disclaimer/.
-Digitalised paper records, leaving artefacts like 0/o/O (zero and O's), B/8, n/r, etc.
Use the ab_*
functions to get properties based on the returned antibiotic ID, see Examples.
Use the ab_*
functions to get properties based on the returned antibiotic ID, see Examples.
Note: the as.ab()
and ab_*
functions may use very long regular expression to match brand names of antimicrobial agents. This may fail on some systems.
World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology: https://www.whocc.no/atc_ddd_index/
WHONET 2019 software: http://www.whonet.org/software.html
European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: http://ec.europa.eu/health/documents/community-register/html/atc.htm
-These have become the gold standard for international drug utilisation monitoring and research.
The WHOCC is located in Oslo at the Norwegian Institute of Public Health and funded by the Norwegian government. The European Commission is the executive of the European Union and promotes its general interest.
NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package. See https://www.whocc.no/copyright_disclaimer/.
-All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this AMR
package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find all download links on our website, which is automatically updated with every code change.
R/disk.R
as.disk.Rd
Interpret disk values as RSI values with as.rsi()
. It supports guidelines from EUCAST and CLSI.
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
-R/mic.R
as.mic.Rd
To interpret MIC values as RSI values, use as.rsi()
on MIC values. It supports guidelines from EUCAST and CLSI.
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
-R/mo.R
as.mo.Rd
Use this function to determine a valid microorganism ID (mo
). Determination is done using intelligent rules and the complete taxonomic kingdoms Bacteria, Chromista, Protozoa, Archaea and most microbial species from the kingdom Fungi (see Source). The input can be almost anything: a full name (like "Staphylococcus aureus"
), an abbreviated name (such as "S. aureus"
), an abbreviation known in the field (such as "MRSA"
), or just a genus. Please see Examples.
Use this function to determine a valid microorganism ID (mo
). Determination is done using intelligent rules and the complete taxonomic kingdoms Bacteria, Chromista, Protozoa, Archaea and most microbial species from the kingdom Fungi (see Source). The input can be almost anything: a full name (like "Staphylococcus aureus"
), an abbreviated name (such as "S. aureus"
), an abbreviation known in the field (such as "MRSA"
), or just a genus. See Examples.
as.mo( @@ -280,7 +280,7 @@
a number between 0
(or "none"
) and 3
(or "all"
), or TRUE
(= 2
) or FALSE
(= 0
) to indicate whether the input should be checked for less probable results, please see Details
a number between 0
(or "none"
) and 3
(or "all"
), or TRUE
(= 2
) or FALSE
(= 0
) to indicate whether the input should be checked for less probable results, see Details
A microorganism ID from this package (class: mo
) is human readable and typically looks like these examples:
Code Full name @@ -324,7 +324,7 @@
Values that cannot be coerced will be considered 'unknown' and will get the MO code UNKNOWN
.
Use the mo_*
functions to get properties based on the returned code, see Examples.
Use the mo_*
functions to get properties based on the returned code, see Examples.
The algorithm uses data from the Catalogue of Life (see below) and from one other source (see microorganisms).
The as.mo()
function uses several coercion rules for fast and logical results. It assesses the input matching criteria in the following order:
Human pathogenic prevalence: the function starts with more prevalent microorganisms, followed by less prevalent ones;
This will lead to the effect that e.g. "E. coli"
(a microorganism highly prevalent in humans) will return the microbial ID of Escherichia coli and not Entamoeba coli (a microorganism less prevalent in humans), although the latter would alphabetically come first.
In addition, the as.mo()
function can differentiate four levels of uncertainty to guess valid results:
There are three helper functions that can be run after using the as.mo()
function:
Use mo_uncertainties()
to get a data.frame that prints in a pretty format with all taxonomic names that were guessed. The output contains the matching score for all matches (see Background on matching score).
Use mo_uncertainties()
to get a data.frame that prints in a pretty format with all taxonomic names that were guessed. The output contains the matching score for all matches (see Matching Score for Microorganisms below).
Use mo_failures()
to get a character vector with all values that could not be coerced to a valid value.
Use mo_renamed()
to get a data.frame with all values that could be coerced based on old, previously accepted taxonomic names.
The intelligent rules consider the prevalence of microorganisms in humans grouped into three groups, which is available as the prevalence
columns in the microorganisms and microorganisms.old data sets. The grouping into human pathogenic prevalence is explained in the section Matching score for microorganisms below.
The intelligent rules consider the prevalence of microorganisms in humans grouped into three groups, which is available as the prevalence
columns in the microorganisms and microorganisms.old data sets. The grouping into human pathogenic prevalence is explained in the section Matching Score for Microorganisms below.
Catalogue of Life: Annual Checklist (public online taxonomic database), http://www.catalogueoflife.org (check included annual version with catalogue_of_life_version()
).
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
-Click here for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with catalogue_of_life_version()
.
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this AMR
package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find all download links on our website, which is automatically updated with every code change.
R/rsi.R
as.rsi.Rd
maximum fraction of invalid antimicrobial interpretations of x
, please see Examples
maximum fraction of invalid antimicrobial interpretations of x
, see Examples
defaults to the latest included EUCAST guideline, see Details for all options
defaults to the latest included EUCAST guideline, see Details for all options
The as.rsi()
function works in four ways:
For interpreting MIC values as well as disk diffusion diameters, supported guidelines to be used as input for the guideline
argument are: "CLSI 2010", "CLSI 2011", "CLSI 2012", "CLSI 2013", "CLSI 2014", "CLSI 2015", "CLSI 2016", "CLSI 2017", "CLSI 2018", "CLSI 2019", "EUCAST 2011", "EUCAST 2012", "EUCAST 2013", "EUCAST 2014", "EUCAST 2015", "EUCAST 2016", "EUCAST 2017", "EUCAST 2018", "EUCAST 2019", "EUCAST 2020", "EUCAST 2021".
Simply using "CLSI"
or "EUCAST"
as input will automatically select the latest version of that guideline. You can set your own data set using the reference_data
argument. The guideline
argument will then be ignored.
After using as.rsi()
, you can use the eucast_rules()
defined by EUCAST to (1) apply inferred susceptibility and resistance based on results of other antimicrobials and (2) apply intrinsic resistance based on taxonomic properties of a microorganism.
The repository of this package contains a machine readable version of all guidelines. This is a CSV file consisting of 20,486 rows and 10 columns. This file is machine readable, since it contains one row for every unique combination of the test method (MIC or disk diffusion), the antimicrobial agent and the microorganism. This allows for easy implementation of these rules in laboratory information systems (LIS). Note that it only contains interpretation guidelines for humans - interpretation guidelines from CLSI for animals were removed.
+The repository of this package contains a machine-readable version of all guidelines. This is a CSV file consisting of 20,486 rows and 10 columns. This file is machine-readable, since it contains one row for every unique combination of the test method (MIC or disk diffusion), the antimicrobial agent and the microorganism. This allows for easy implementation of these rules in laboratory information systems (LIS). Note that it only contains interpretation guidelines for humans - interpretation guidelines from CLSI for animals were removed.
This AMR package honours this new insight. Use susceptibility()
(equal to proportion_SI()
) to determine antimicrobial susceptibility and count_susceptible()
(equal to count_SI()
) to count susceptible isolates.
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
-All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this AMR
package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find all download links on our website, which is automatically updated with every code change.
R/atc_online.R
atc_online.Rd
property of an ATC code. Valid values are "ATC"
, "Name"
, "DDD"
, "U"
("unit"
), "Adm.R"
, "Note"
and groups
. For this last option, all hierarchical groups of an ATC code will be returned, see Examples.
property of an ATC code. Valid values are "ATC"
, "Name"
, "DDD"
, "U"
("unit"
), "Adm.R"
, "Note"
and groups
. For this last option, all hierarchical groups of an ATC code will be returned, see Examples.
type of administration when using property = "Adm.R"
, see Details
type of administration when using property = "Adm.R"
, see Details
N.B. This function requires an internet connection and only works if the following packages are installed: curl
, rvest
, xml2
.
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
-R/availability.R
availability.Rd
The function returns a data.frame with columns "resistant"
and "visual_resistance"
. The values in that columns are calculated with resistance()
.
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
-R/bug_drug_combinations.R
bug_drug_combinations.Rd
Determine antimicrobial resistance (AMR) of all bug-drug combinations in your data set where at least 30 (default) isolates are available per species. Use format()
on the result to prettify it to a publicable/printable format, see Examples.
Determine antimicrobial resistance (AMR) of all bug-drug combinations in your data set where at least 30 (default) isolates are available per species. Use format()
on the result to prettify it to a publicable/printable format, see Examples.
bug_drug_combinations(x, col_mo = NULL, FUN = mo_shortname, ...) @@ -288,7 +288,7 @@
the minimum allowed number of available (tested) isolates. Any isolate count lower than minimum
will return NA
with a warning. The default number of 30
isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see Source.
the minimum allowed number of available (tested) isolates. Any isolate count lower than minimum
will return NA
with a warning. The default number of 30
isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see Source.
The function format()
calculates the resistance per bug-drug combination. Use combine_IR = FALSE
(default) to test R vs. S+I and combine_IR = TRUE
to test R+I vs. S.
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
-
This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, http://www.catalogueoflife.org). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, lpsn.dsmz.de). This supplementation is needed until the CoL+ project is finished, which we await.
Click here for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with catalogue_of_life_version()
.
The Catalogue of Life (http://www.catalogueoflife.org) is the most comprehensive and authoritative global index of species currently available. It holds essential information on the names, relationships and distributions of over 1.9 million species. The Catalogue of Life is used to support the major biodiversity and conservation information services such as the Global Biodiversity Information Facility (GBIF), Encyclopedia of Life (EoL) and the International Union for Conservation of Nature Red List. It is recognised by the Convention on Biological Diversity as a significant component of the Global Taxonomy Initiative and a contribution to Target 1 of the Global Strategy for Plant Conservation.
The syntax used to transform the original data to a cleansed R format, can be found here: https://github.com/msberends/AMR/blob/master/data-raw/reproduction_of_microorganisms.R.
-
This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, http://www.catalogueoflife.org). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, lpsn.dsmz.de). This supplementation is needed until the CoL+ project is finished, which we await.
Click here for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with catalogue_of_life_version()
.
These functions can be used to count resistant/susceptible microbial isolates. All functions support quasiquotation with pipes, can be used in summarise()
from the dplyr
package and also support grouped variables, please see Examples.
These functions can be used to count resistant/susceptible microbial isolates. All functions support quasiquotation with pipes, can be used in summarise()
from the dplyr
package and also support grouped variables, see Examples.
count_resistant()
should be used to count resistant isolates, count_susceptible()
should be used to count susceptible isolates.
(for combination therapies, i.e. using more than one variable for ...
): a logical to indicate that isolates must be tested for all antibiotics, see section Combination therapy below
(for combination therapies, i.e. using more than one variable for ...
): a logical to indicate that isolates must be tested for all antibiotics, see section Combination Therapy below
The function count_resistant()
is equal to the function count_R()
. The function count_susceptible()
is equal to the function count_SI()
.
The function n_rsi()
is an alias of count_all()
. They can be used to count all available isolates, i.e. where all input antibiotics have an available result (S, I or R). Their use is equal to n_distinct()
. Their function is equal to count_susceptible(...) + count_resistant(...)
.
The function count_df()
takes any variable from data
that has an rsi
class (created with as.rsi()
) and counts the number of S's, I's and R's. It also supports grouped variables. The function rsi_df()
works exactly like count_df()
, but adds the percentage of S, I and R.
This AMR package honours this new insight. Use susceptibility()
(equal to proportion_SI()
) to determine antimicrobial susceptibility and count_susceptible()
(equal to count_SI()
) to count susceptible isolates.
Using only_all_tested
has no impact when only using one antibiotic as input.
R/data.R
dosage.Rd
'EUCAST Clinical Breakpoint Tables' v11.0 (2021) are based on the dosages in this data set.
-All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this AMR
package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find all download links on our website, which is automatically updated with every code change.
Apply rules for clinical breakpoints and intrinsic resistance as defined by the European Committee on Antimicrobial Susceptibility Testing (EUCAST, https://eucast.org), see Source. Use eucast_dosage()
to get a data.frame with advised dosages of a certain bug-drug combination, which is based on the dosage data set.
To improve the interpretation of the antibiogram before EUCAST rules are applied, some non-EUCAST rules can applied at default, see Details.
+To improve the interpretation of the antibiogram before EUCAST rules are applied, some non-EUCAST rules can applied at default, see Details.
eucast_rules( @@ -295,7 +295,7 @@ To improve the interpretation of the antibiogram before EUCAST rules are applied
column name of an antibiotic, please see section Antibiotics below
column name of an antibiotic, see section Antibiotics below
Note: This function does not translate MIC values to RSI values. Use as.rsi()
for that.
Note: When ampicillin (AMP, J01CA01) is not available but amoxicillin (AMX, J01CA04) is, the latter will be used for all rules where there is a dependency on ampicillin. These drugs are interchangeable when it comes to expression of antimicrobial resistance.
The file containing all EUCAST rules is located here: https://github.com/msberends/AMR/blob/master/data-raw/eucast_rules.tsv.
The file containing all EUCAST rules is located here: https://github.com/msberends/AMR/blob/master/data-raw/eucast_rules.tsv.
Before further processing, two non-EUCAST rules about drug combinations can be applied to improve the efficacy of the EUCAST rules, and the reliability of your data (analysis). These rules are:
To define antibiotics column names, leave as it is to determine it automatically with guess_ab_col()
or input a text (case-insensitive), or use NULL
to skip a column (e.g. TIC = NULL
to skip ticarcillin). Manually defined but non-existing columns will be skipped with a warning.
The following antibiotics are used for the functions eucast_rules()
and mdro()
. These are shown below in the format 'name (antimicrobial ID
, ATC code)', sorted alphabetically:
Amikacin (AMK
, J01GB06), amoxicillin (AMX
, J01CA04), amoxicillin/clavulanic acid (AMC
, J01CR02), ampicillin (AMP
, J01CA01), ampicillin/sulbactam (SAM
, J01CR01), avoparcin (AVO
, no ATC code), azithromycin (AZM
, J01FA10), azlocillin (AZL
, J01CA09), aztreonam (ATM
, J01DF01), bacampicillin (BAM
, J01CA06), benzylpenicillin (PEN
, J01CE01), cadazolid (CDZ
, J01DD09), carbenicillin (CRB
, J01CA03), carindacillin (CRN
, J01CA05), cefacetrile (CAC
, J01DB10), cefaclor (CEC
, J01DC04), cefadroxil (CFR
, J01DB05), cefaloridine (RID
, J01DB02), cefamandole (MAN
, J01DC03), cefatrizine (CTZ
, J01DB07), cefazedone (CZD
, J01DB06), cefazolin (CZO
, J01DB04), cefcapene (CCP
, no ATC code), cefcapene pivoxil (CCX
, no ATC code), cefdinir (CDR
, J01DD15), cefditoren (DIT
, J01DD16), cefditoren pivoxil (DIX
, no ATC code), cefepime (FEP
, J01DE01), cefetamet (CAT
, J01DD10), cefetamet pivoxil (CPI
, no ATC code), cefixime (CFM
, J01DD08), cefmenoxime (CMX
, J01DD05), cefmetazole (CMZ
, J01DC09), cefodizime (DIZ
, J01DD09), cefonicid (CID
, J01DC06), cefoperazone (CFP
, J01DD12), cefoperazone/sulbactam (CSL
, J01DD62), ceforanide (CND
, J01DC11), cefotaxime (CTX
, J01DD01), cefotaxime/clavulanic acid (CTC
, no ATC code), cefotaxime/sulbactam (CTS
, no ATC code), cefotetan (CTT
, J01DC05), cefotiam (CTF
, J01DC07), cefotiam hexetil (CHE
, no ATC code), cefovecin (FOV
, no ATC code), cefoxitin (FOX
, J01DC01), cefoxitin screening (FOX1
, no ATC code), cefpimizole (CFZ
, no ATC code), cefpiramide (CPM
, J01DD11), cefpirome (CPO
, J01DE02), cefpodoxime (CPD
, J01DD13), cefpodoxime proxetil (CPX
, no ATC code), cefpodoxime/clavulanic acid (CDC
, no ATC code), cefprozil (CPR
, J01DC10), cefroxadine (CRD
, J01DB11), cefsulodin (CFS
, J01DD03), ceftaroline (CPT
, J01DI02), ceftazidime (CAZ
, J01DD02), ceftazidime/avibactam (CZA
, no ATC code), ceftazidime/clavulanic acid (CCV
, J01DD52), cefteram (CEM
, no ATC code), cefteram pivoxil (CPL
, no ATC code), ceftezole (CTL
, J01DB12), ceftibuten (CTB
, J01DD14), ceftiofur (TIO
, no ATC code), ceftizoxime (CZX
, J01DD07), ceftizoxime alapivoxil (CZP
, no ATC code), ceftobiprole (BPR
, J01DI01), ceftobiprole medocaril (CFM1
, J01DI01), ceftolozane/enzyme inhibitor (CEI
, J01DI54), ceftriaxone (CRO
, J01DD04), cefuroxime (CXM
, J01DC02), cephalexin (LEX
, J01DB01), cephalothin (CEP
, J01DB03), cephapirin (HAP
, J01DB08), cephradine (CED
, J01DB09), chloramphenicol (CHL
, J01BA01), ciprofloxacin (CIP
, J01MA02), clarithromycin (CLR
, J01FA09), clindamycin (CLI
, J01FF01), colistin (COL
, J01XB01), cycloserine (CYC
, J04AB01), dalbavancin (DAL
, J01XA04), daptomycin (DAP
, J01XX09), dibekacin (DKB
, J01GB09), dirithromycin (DIR
, J01FA13), doripenem (DOR
, J01DH04), doxycycline (DOX
, J01AA02), enoxacin (ENX
, J01MA04), epicillin (EPC
, J01CA07), ertapenem (ETP
, J01DH03), erythromycin (ERY
, J01FA01), fleroxacin (FLE
, J01MA08), flucloxacillin (FLC
, J01CF05), flurithromycin (FLR1
, J01FA14), fosfomycin (FOS
, J01XX01), fusidic acid (FUS
, J01XC01), gatifloxacin (GAT
, J01MA16), gemifloxacin (GEM
, J01MA15), gentamicin (GEN
, J01GB03), grepafloxacin (GRX
, J01MA11), hetacillin (HET
, J01CA18), imipenem (IPM
, J01DH51), isepamicin (ISE
, J01GB11), josamycin (JOS
, J01FA07), kanamycin (KAN
, J01GB04), latamoxef (LTM
, J01DD06), levofloxacin (LVX
, J01MA12), lincomycin (LIN
, J01FF02), linezolid (LNZ
, J01XX08), lomefloxacin (LOM
, J01MA07), loracarbef (LOR
, J01DC08), mecillinam (Amdinocillin) (MEC
, J01CA11), meropenem (MEM
, J01DH02), meropenem/vaborbactam (MEV
, J01DH52), metampicillin (MTM
, J01CA14), mezlocillin (MEZ
, J01CA10), midecamycin (MID
, J01FA03), minocycline (MNO
, J01AA08), miocamycin (MCM
, J01FA11), moxifloxacin (MFX
, J01MA14), nalidixic acid (NAL
, J01MB02), neomycin (NEO
, J01GB05), netilmicin (NET
, J01GB07), nitrofurantoin (NIT
, J01XE01), norfloxacin (NOR
, J01MA06), norvancomycin (NVA
, no ATC code), novobiocin (NOV
, QJ01XX95), ofloxacin (OFX
, J01MA01), oleandomycin (OLE
, J01FA05), oritavancin (ORI
, J01XA05), oxacillin (OXA
, J01CF04), pazufloxacin (PAZ
, J01MA18), pefloxacin (PEF
, J01MA03), phenoxymethylpenicillin (PHN
, J01CE02), piperacillin (PIP
, J01CA12), piperacillin/tazobactam (TZP
, J01CR05), pirlimycin (PRL
, no ATC code), pivampicillin (PVM
, J01CA02), pivmecillinam (PME
, J01CA08), polymyxin B (PLB
, J01XB02), pristinamycin (PRI
, J01FG01), prulifloxacin (PRU
, J01MA17), quinupristin/dalfopristin (QDA
, J01FG02), ramoplanin (RAM
, no ATC code), ribostamycin (RST
, J01GB10), rifampicin (RIF
, J04AB02), rokitamycin (ROK
, J01FA12), roxithromycin (RXT
, J01FA06), rufloxacin (RFL
, J01MA10), sisomicin (SIS
, J01GB08), sparfloxacin (SPX
, J01MA09), spiramycin (SPI
, J01FA02), streptoduocin (STR
, J01GA02), streptomycin (STR1
, J01GA01), sulbenicillin (SBC
, J01CA16), sulfadiazine (SDI
, J01EC02), sulfadiazine/trimethoprim (SLT1
, J01EE02), sulfadimethoxine (SUD
, J01ED01), sulfadimidine (SDM
, J01EB03), sulfadimidine/trimethoprim (SLT2
, J01EE05), sulfafurazole (SLF
, J01EB05), sulfaisodimidine (SLF1
, J01EB01), sulfalene (SLF2
, J01ED02), sulfamazone (SZO
, J01ED09), sulfamerazine (SLF3
, J01ED07), sulfamerazine/trimethoprim (SLT3
, J01EE07), sulfamethizole (SLF4
, J01EB02), sulfamethoxazole (SMX
, J01EC01), sulfamethoxypyridazine (SLF5
, J01ED05), sulfametomidine (SLF6
, J01ED03), sulfametoxydiazine (SLF7
, J01ED04), sulfametrole/trimethoprim (SLT4
, J01EE03), sulfamoxole (SLF8
, J01EC03), sulfamoxole/trimethoprim (SLT5
, J01EE04), sulfanilamide (SLF9
, J01EB06), sulfaperin (SLF10
, J01ED06), sulfaphenazole (SLF11
, J01ED08), sulfapyridine (SLF12
, J01EB04), sulfathiazole (SUT
, J01EB07), sulfathiourea (SLF13
, J01EB08), talampicillin (TAL
, J01CA15), tedizolid (TZD
, J01XX11), teicoplanin (TEC
, J01XA02), teicoplanin-macromethod (TCM
, no ATC code), telavancin (TLV
, J01XA03), telithromycin (TLT
, J01FA15), temafloxacin (TMX
, J01MA05), temocillin (TEM
, J01CA17), tetracycline (TCY
, J01AA07), thiacetazone (THA
, no ATC code), ticarcillin (TIC
, J01CA13), ticarcillin/clavulanic acid (TCC
, J01CR03), tigecycline (TGC
, J01AA12), tobramycin (TOB
, J01GB01), trimethoprim (TMP
, J01EA01), trimethoprim/sulfamethoxazole (SXT
, J01EE01), troleandomycin (TRL
, J01FA08), trovafloxacin (TVA
, J01MA13), vancomycin (VAN
, J01XA01)
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
-All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this AMR
package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find all download links on our website, which is automatically updated with every code change.
R/data.R
example_isolates.Rd
PEN:RIF
40 different antibiotics with class rsi
(see as.rsi()
); these column names occur in the antibiotics data set and can be translated with ab_name()
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this AMR
package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find all download links on our website, which is automatically updated with every code change.
R/data.R
example_isolates_unclean.Rd
AMX:GEN
4 different antibiotics that have to be transformed with as.rsi()
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this AMR
package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find all download links on our website, which is automatically updated with every code change.
R/filter_ab_class.R
filter_ab_class.Rd
All columns of x
will be searched for known antibiotic names, abbreviations, brand names and codes (ATC, EARS-Net, WHO, etc.). This means that a filter function like e.g. filter_aminoglycosides()
will include column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc.
R/first_isolate.R
first_isolate.Rd
column name of the key antibiotics to determine first weighted isolates, see key_antibiotics()
. Defaults to the first column that starts with 'key' followed by 'ab' or 'antibiotics' (case insensitive). Use col_keyantibiotics = FALSE
to prevent this.
column name of the key antibiotics to determine first (weighted) isolates, see key_antibiotics()
. Defaults to the first column that starts with 'key' followed by 'ab' or 'antibiotics' (case insensitive). Use col_keyantibiotics = FALSE
to prevent this.
episode in days after which a genus/species combination will be determined as 'first isolate' again. The default of 365 days is based on the guideline by CLSI, see Source.
episode in days after which a genus/species combination will be determined as 'first isolate' again. The default of 365 days is based on the guideline by CLSI, see Source.
type to determine weighed isolates; can be "keyantibiotics"
or "points"
, see Details
type to determine weighed isolates; can be "keyantibiotics"
or "points"
, see Details
logical to determine whether antibiotic interpretations with "I"
will be ignored when type = "keyantibiotics"
, see Details
logical to determine whether antibiotic interpretations with "I"
will be ignored when type = "keyantibiotics"
, see Details
points until the comparison of key antibiotics will lead to inclusion of an isolate when type = "points"
, see Details
points until the comparison of key antibiotics will lead to inclusion of an isolate when type = "points"
, see Details
A logical
vector
These functions are context-aware when used inside dplyr
verbs, such as filter()
, mutate()
and summarise()
. This means that then the x
argument can be left blank, please see Examples.
These functions are context-aware when used inside dplyr
verbs, such as filter()
, mutate()
and summarise()
. This means that then the x
argument can be left blank, see Examples.
The first_isolate()
function is a wrapper around the is_new_episode()
function, but more efficient for data sets containing microorganism codes or names.
All isolates with a microbial ID of NA
will be excluded as first isolate.
All isolates with a microbial ID of NA
will be excluded as first isolate.
To conduct an analysis of antimicrobial resistance, you should only include the first isolate of every patient per episode (Hindler et al. 2007). If you would not do this, you could easily get an overestimate or underestimate of the resistance of an antibiotic. Imagine that a patient was admitted with an MRSA and that it was found in 5 different blood cultures the following week. The resistance percentage of oxacillin of all S. aureus isolates would be overestimated, because you included this MRSA more than once. It would be selection bias.
-filter_*()
shortcutsfilter_*()
ShortcutsThe functions filter_first_isolate()
and filter_first_weighted_isolate()
are helper functions to quickly filter on first isolates.
There are two ways to determine whether isolates can be included as first weighted isolates which will give generally the same results:
There are two ways to determine whether isolates can be included as first weighted isolates which will give generally the same results:
Using type = "keyantibiotics"
and argument ignore_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 the key_antibiotics()
function.
Using type = "points"
and argument 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 points_threshold
, which default to 2
, an isolate will be (re)selected as a first weighted isolate.
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
-If x
is a matrix with at least two rows and columns, it is taken as a two-dimensional contingency table: the entries of x
must be non-negative integers. Otherwise, x
and y
must be vectors or factors of the same length; cases with missing values are removed, the objects are coerced to factors, and the contingency table is computed from these. Then Pearson's chi-squared test is performed of the null hypothesis that the joint distribution of the cell counts in a 2-dimensional contingency table is the product of the row and column marginals.
The p-value is computed from the asymptotic chi-squared distribution of the test statistic.
In the contingency table case simulation is done by random sampling from the set of all contingency tables with given marginals, and works only if the marginals are strictly positive. Note that this is not the usual sampling situation assumed for a chi-squared test (such as the G-test) but rather that for Fisher's exact test.
-In the goodness-of-fit case simulation is done by random sampling from the discrete distribution specified by p
, each sample being of size n = sum(x)
. This simulation is done in R and may be slow.
In the goodness-of-fit case simulation is done by random sampling from the discrete distribution specified by p
, each sample being of size n = sum(x)
. This simulation is done in R and may be slow.
Use the G-test of goodness-of-fit when you have one nominal variable with two or more values (such as male and female, or red, pink and white flowers). You compare the observed counts of numbers of observations in each category with the expected counts, which you calculate using some kind of theoretical expectation (such as a 1:1 sex ratio or a 1:2:1 ratio in a genetic cross).
If the expected number of observations in any category is too small, the G-test may give inaccurate results, and you should use an exact test instead (fisher.test()
).
The G-test of goodness-of-fit is an alternative to the chi-square test of goodness-of-fit (chisq.test()
); each of these tests has some advantages and some disadvantages, and the results of the two tests are usually very similar.
Use the G-test of independence when you have two nominal variables, each with two or more possible values. You want to know whether the proportions for one variable are different among values of the other variable.
@@ -320,7 +320,7 @@Fisher's exact test (fisher.test()
) is an exact test, where the G-test is still only an approximation. For any 2x2 table, Fisher's Exact test may be slower but will still run in seconds, even if the sum of your observations is multiple millions.
The G-test of independence is an alternative to the chi-square test of independence (chisq.test()
), and they will give approximately the same results.
Unlike the exact test of goodness-of-fit (fisher.test()
), the G-test does not directly calculate the probability of obtaining the observed results or something more extreme. Instead, like almost all statistical tests, the G-test has an intermediate step; it uses the data to calculate a test statistic that measures how far the observed data are from the null expectation. You then use a mathematical relationship, in this case the chi-square distribution, to estimate the probability of obtaining that value of the test statistic.
where df
are the degrees of freedom.
If there are more than two categories and you want to find out which ones are significantly different from their null expectation, you can use the same method of testing each category vs. the sum of all categories, with the Bonferroni correction. You use G-tests for each category, of course.
-
The lifecycle of this function is questioning. This function might be no longer be optimal approach, or is it questionable whether this function should be in this AMR
package at all.
R/episode.R
get_episode.Rd
length of the required episode in days, please see Details
length of the required episode in days, see Details
Dates are first sorted from old to new. The oldest date will mark the start of the first episode. After this date, the next date will be marked that is at least episode_days
days later than the start of the first episode. From that second marked date on, the next date will be marked that is at least episode_days
days later than the start of the second episode which will be the start of the third episode, and so on. Before the vector is being returned, the original order will be restored.
The first_isolate()
function is a wrapper around the is_new_episode()
function, but is more efficient for data sets containing microorganism codes or names.
The dplyr
package is not required for these functions to work, but these functions support variable grouping and work conveniently inside dplyr
verbs such as filter()
, mutate()
and summarise()
.
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
-The colours for labels and points can be changed by adding another scale layer for colour, like scale_colour_viridis_d()
or scale_colour_brewer()
.
the minimum allowed number of available (tested) isolates. Any isolate count lower than minimum
will return NA
with a warning. The default number of 30
isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see Source.
the minimum allowed number of available (tested) isolates. Any isolate count lower than minimum
will return NA
with a warning. The default number of 30
isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see Source.
At default, the names of antibiotics will be shown on the plots using ab_name()
. This can be set with the translate_ab
argument. See count_df()
.
At default, the names of antibiotics will be shown on the plots using ab_name()
. This can be set with the translate_ab
argument. See count_df()
.
geom_rsi()
will take any variable from the data that has an rsi
class (created with as.rsi()
) using rsi_df()
and will plot bars with the percentage R, I and S. The default behaviour is to have the bars stacked and to have the different antibiotics on the x axis.
scale_rsi_colours()
sets colours to the bars: pastel blue for S, pastel turquoise for I and pastel red for R, using ggplot2::scale_fill_manual()
.
theme_rsi()
is a [ggplot2 theme][ggplot2::theme()
with minimal distraction.
labels_rsi_count()
print datalabels on the bars with percentage and amount of isolates using ggplot2::geom_text()
.
ggplot_rsi()
is a wrapper around all above functions that uses data as first input. This makes it possible to use this function after a pipe (%>%
). See Examples.
ggplot_rsi()
is a wrapper around all above functions that uses data as first input. This makes it possible to use this function after a pipe (%>%
). See Examples.
The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. Since this function needs wider usage and more extensive testing, you are very welcome to suggest changes at our repository or write us an email (see section 'Contact Us').
You can look for an antibiotic (trade) name or abbreviation and it will search x
and the antibiotics data set for any column containing a name or code of that antibiotic. Longer columns names take precedence over shorter column names.
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
-Data set with 2,000 example isolates
Data Set with 2,000 Example Isolates
Data set with 67,151 microorganisms
Data Set with 67,151 Microorganisms
Data set with 5,580 common microorganism codes
Data Set with 5,580 Common Microorganism Codes
Data set with previously accepted taxonomic names
Data Set with Previously Accepted Taxonomic Names
Data sets with 558 antimicrobials
Data Sets with 558 Antimicrobials
Data set with bacterial intrinsic resistance
Data Set with Bacterial Intrinsic Resistance
Data set with treatment dosages as defined by EUCAST
Data Set with Treatment Dosages as Defined by EUCAST
Lifecycles of functions in the AMR
package
Lifecycles of Functions in the amr
Package
Data set with unclean data
Data Set with Unclean Data
Data set for R/SI interpretation
Data Set for R/SI Interpretation
Data set with 500 isolates - WHONET example
Data Set with 500 Isolates - WHONET Example
as.mo()
is.mo()
mo_failures()
mo_uncertainties()
mo_renamed()
Transform input to a microorganism ID
Transform Input to a Microorganism ID
mo_name()
mo_fullname()
mo_shortname()
mo_subspecies()
mo_species()
mo_genus()
mo_family()
mo_order()
mo_class()
mo_phylum()
mo_kingdom()
mo_domain()
mo_type()
mo_gramstain()
mo_is_gram_negative()
mo_is_gram_positive()
mo_is_yeast()
mo_is_intrinsic_resistant()
mo_snomed()
mo_ref()
mo_authors()
mo_year()
mo_rank()
mo_taxonomy()
mo_synonyms()
mo_info()
mo_url()
mo_property()
Get properties of a microorganism
Get Properties of a Microorganism
User-defined reference data set for microorganisms
User-Defined Reference Data Set for Microorganisms
Transform input to an antibiotic ID
Transform Input to an Antibiotic ID
ab_name()
ab_atc()
ab_cid()
ab_synonyms()
ab_tradenames()
ab_group()
ab_atc_group1()
ab_atc_group2()
ab_loinc()
ab_ddd()
ab_info()
ab_url()
ab_property()
Get properties of an antibiotic
Get Properties of an Antibiotic
Retrieve antimicrobial drug names and doses from clinical text
Retrieve Antimicrobial Drug Names and Doses from Clinical Text
Get ATC properties from WHOCC website
Get ATC Properties from WHOCC Website
Interpret MIC and disk values, or clean raw R/SI data
Interpret MIC and Disk Values, or Clean Raw R/SI Data
Transform input to minimum inhibitory concentrations (MIC)
Transform Input to Minimum Inhibitory Concentrations (MIC)
Transform input to disk diffusion diameters
Transform Input to Disk Diffusion Diameters
Apply EUCAST rules
Apply EUCAST Rules
plot(<disk>)
plot(<mic>)
barplot(<mic>)
plot(<rsi>)
barplot(<rsi>)
Plotting for classes rsi
, mic
and disk
Plotting for Classes rsi
, mic
and disk
Create identifier of an isolate
Create Identifier of an Isolate
resistance()
susceptibility()
proportion_R()
proportion_IR()
proportion_I()
proportion_SI()
proportion_S()
proportion_df()
rsi_df()
Calculate microbial resistance
Calculate Microbial Resistance
count_resistant()
count_susceptible()
count_R()
count_IR()
count_I()
count_SI()
count_S()
count_all()
n_rsi()
count_df()
Count available isolates
Count Available Isolates
Determine (new) episodes for patients
Determine (New) Episodes for Patients
first_isolate()
filter_first_isolate()
filter_first_weighted_isolate()
Determine first (weighted) isolates
Determine First (Weighted) Isolates
Key antibiotics for first weighted isolates
Key Antibiotics for First (Weighted) Isolates
mdro()
custom_mdro_guideline()
brmo()
mrgn()
mdr_tb()
mdr_cmi2012()
eucast_exceptional_phenotypes()
Determine multidrug-resistant organisms (MDRO)
Determine Multidrug-Resistant Organisms (MDRO)
ggplot_rsi()
geom_rsi()
facet_rsi()
scale_y_percent()
scale_rsi_colours()
theme_rsi()
labels_rsi_count()
AMR plots with ggplot2
AMR Plots with ggplot2
Determine bug-drug combinations
Determine Bug-Drug Combinations
ab_class()
aminoglycosides()
carbapenems()
cephalosporins()
cephalosporins_1st()
cephalosporins_2nd()
cephalosporins_3rd()
cephalosporins_4th()
cephalosporins_5th()
fluoroquinolones()
glycopeptides()
macrolides()
penicillins()
tetracyclines()
Antibiotic class selectors
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 isolates on result in antimicrobial class
Filter Isolates on Result in Antimicrobial Class
Guess antibiotic column
Guess Antibiotic Column
Split ages into age groups
Split Ages into Age Groups
Age in years of individuals
Age in Years of Individuals
Check availability of columns
Check Availability of Columns
Translate strings from AMR package
Translate Strings from AMR Package
PCA biplot with ggplot2
PCA Biplot with ggplot2
inner_join_microorganisms()
left_join_microorganisms()
right_join_microorganisms()
full_join_microorganisms()
semi_join_microorganisms()
anti_join_microorganisms()
Join microorganisms to a data set
Join microorganisms to a Data Set
Pattern matching with keyboard shortcut
Pattern Matching with Keyboard Shortcut
Calculate the matching score for microorganisms
Calculate the Matching Score for Microorganisms
Random MIC values/disk zones/RSI generation
Random MIC Values/Disk Zones/RSI Generation
Kurtosis of the sample
Kurtosis of the Sample
Skewness of the sample
Skewness of the Sample
Deprecated functions
Deprecated Functions
R/data.R
intrinsic_resistant.Rd
The repository of this AMR
package contains a file comprising this exact data set: https://github.com/msberends/AMR/blob/master/data-raw/intrinsic_resistant.txt. This file allows for machine reading EUCAST guidelines about intrinsic resistance, which is almost impossible with the Excel and PDF files distributed by EUCAST. The file is updated automatically.
This data set is based on 'EUCAST Expert Rules' and 'EUCAST Intrinsic Resistance and Unusual Phenotypes' v3.2 (2020).
-All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this AMR
package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find all download links on our website, which is automatically updated with every code change.
R/isolate_identifier.R
isolate_identifier.Rd
The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. Since this function needs wider usage and more extensive testing, you are very welcome to suggest changes at our repository or write us an email (see section 'Contact Us').
R/join_microorganisms.R
join.Rd
Note: As opposed to the join()
functions of dplyr
, character vectors are supported and at default existing columns will get a suffix "2"
and the newly joined columns will not get a suffix.
If the dplyr
package is installed, their join functions will be used. Otherwise, the much slower merge()
function from base R will be used.
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
-R/key_antibiotics.R
key_antibiotics.Rd
These function can be used to determine first isolates (see first_isolate()
). Using key antibiotics to determine first isolates is more reliable than without key antibiotics. These selected isolates can then be called first weighted isolates.
These function can be used to determine first isolates (see first_isolate()
). Using key antibiotics to determine first isolates is more reliable than without key antibiotics. These selected isolates can then be called first 'weighted' isolates.
key_antibiotics( @@ -313,15 +313,15 @@type -+ type to determine weighed isolates; can be
"keyantibiotics"
or"points"
, see Detailstype to determine weighed isolates; can be
"keyantibiotics"
or"points"
, see Detailsignore_I -+ logical to determine whether antibiotic interpretations with
"I"
will be ignored whentype = "keyantibiotics"
, see Detailslogical to determine whether antibiotic interpretations with
"I"
will be ignored whentype = "keyantibiotics"
, see Detailspoints_threshold -+ points until the comparison of key antibiotics will lead to inclusion of an isolate when
type = "points"
, see Detailspoints until the comparison of key antibiotics will lead to inclusion of an isolate when
type = "points"
, see Details- info @@ -331,7 +331,7 @@Details
-The
+key_antibiotics()
function is context-aware when used insidedplyr
verbs, such asfilter()
,mutate()
andsummarise()
. This means that then thex
argument can be left blank, please see Examples.The
key_antibiotics()
function is context-aware when used insidedplyr
verbs, such asfilter()
,mutate()
andsummarise()
. This means that then thex
argument can be left blank, see Examples.The function
key_antibiotics()
returns a character vector with 12 antibiotic results for every isolate. These isolates can then be compared usingkey_antibiotics_equal()
, to check if two isolates have generally the same antibiogram. Missing and invalid values are replaced with a dot ("."
) bykey_antibiotics()
and ignored bykey_antibiotics_equal()
.The
first_isolate()
function only uses this function on the same microbial species from the same patient. Using this, e.g. an MRSA will be included after a susceptible S. aureus (MSSA) is found within the same patient episode. Without key antibiotic comparison it would not. Seefirst_isolate()
for more info.At default, the antibiotics that are used for Gram-positive bacteria are:
@@ -365,25 +365,25 @@
The function
-key_antibiotics_equal()
checks the characters returned bykey_antibiotics()
for equality, and returns alogical
vector.Stable lifecycle
+Stable Lifecycle
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
-Key antibiotics
+Key Antibiotics
-There are two ways to determine whether isolates can be included as first weighted isolates which will give generally the same results:
+
There are two ways to determine whether isolates can be included as first weighted isolates which will give generally the same results:
-
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.Read more on our website!
+Read more on Our Website!
diff --git a/docs/reference/kurtosis.html b/docs/reference/kurtosis.html index 18a5cd9f..7f841b6d 100644 --- a/docs/reference/kurtosis.html +++ b/docs/reference/kurtosis.html @@ -6,7 +6,7 @@ -Kurtosis of the sample — kurtosis • AMR (for R) +Kurtosis of the Sample — kurtosis • AMR (for R) @@ -48,7 +48,7 @@ - + @@ -82,7 +82,7 @@ @@ -233,7 +233,7 @@@@ -270,14 +270,14 @@Stable lifecycle
+Stable Lifecycle
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
-Read more on our website!
+Read more on Our Website!
diff --git a/docs/reference/lifecycle.html b/docs/reference/lifecycle.html index 3de9ec5d..1682ba1a 100644 --- a/docs/reference/lifecycle.html +++ b/docs/reference/lifecycle.html @@ -6,7 +6,7 @@ -Lifecycles of functions in the AMR package — lifecycle • AMR (for R) +Lifecycles of Functions in the amr Package — lifecycle • AMR (for R) @@ -48,7 +48,7 @@ - + @@ -84,7 +84,7 @@ This page contains a section for every lifecycle (with text borrowed from the af
AMR
packageamr
PackageR/lifecycle.R
lifecycle.Rd
The lifecycle of this function is experimental. An experimental function is in early stages of development. The unlying code might be changing frequently. Experimental functions might be removed without deprecation, so you are generally best off waiting until a function is more mature before you use it in production code. Experimental functions are only available in development versions of this AMR
package and will thus not be included in releases that are submitted to CRAN, since such functions have not yet matured enough.
The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. Since this function needs wider usage and more extensive testing, you are very welcome to suggest changes at our repository or write us an email (see section 'Contact Us').
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
-
The lifecycle of this function is retired. A retired function is no longer under active development, and (if appropiate) a better alternative is available. No new arguments will be added, and only the most critical bugs will be fixed. In a future version, this function will be removed.
R/like.R
like.Rd
Using RStudio? The text %like%
can also be directly inserted in your code from the Addins menu and can have its own Keyboard Shortcut like Ctrl+Shift+L
or Cmd+Shift+L
(see Tools
> Modify Keyboard Shortcuts...
).
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
-R/mdro.R
mdro.Rd
a specific guideline to follow. Can also have custom_mdro_guideline()
as input. When left empty, the publication by Magiorakos et al. (2012, Clinical Microbiology and Infection) will be followed, please see Details.
a specific guideline to follow, see sections Supported international / national guidelines and Using Custom Guidelines below. When left empty, the publication by Magiorakos et al. (see below) will be followed.
column name of an antibiotic, please see section Antibiotics below
in case of custom_mdro_guideline()
: a set of rules, see section Using Custom Guidelines below. Otherwise: column name of an antibiotic, see section Antibiotics below.
a logical to indicate whether the returned value should be an ordered factor (TRUE
, default), or otherwise a character vector
Please see Details for the list of publications used for this function.
+See the supported guidelines above for the list of publications used for this function.
These functions are context-aware when used inside dplyr
verbs, such as filter()
, mutate()
and summarise()
. This means that then the x
argument can be left blank, please see Examples.
These functions are context-aware when used inside dplyr
verbs, such as filter()
, mutate()
and summarise()
. This means that then the x
argument can be left blank, see Examples.
For the pct_required_classes
argument, values above 1 will be divided by 100. This is to support both fractions (0.75
or 3/4
) and percentages (75
).
Note: Every test that involves the Enterobacteriaceae family, will internally be performed using its newly named order Enterobacterales, since the Enterobacteriaceae family has been taxonomically reclassified by Adeolu et al. in 2016. Before that, Enterobacteriaceae was the only family under the Enterobacteriales (with an i) order. All species under the old Enterobacteriaceae family are still under the new Enterobacterales (without an i) order, but divided into multiple families. The way tests are performed now by this mdro()
function makes sure that results from before 2016 and after 2016 are identical.
Note: Every test that involves the Enterobacteriaceae family, will internally be performed using its newly named order Enterobacterales, since the Enterobacteriaceae family has been taxonomically reclassified by Adeolu et al. in 2016. Before that, Enterobacteriaceae was the only family under the Enterobacteriales (with an i) order. All species under the old Enterobacteriaceae family are still under the new Enterobacterales (without an i) order, but divided into multiple families. The way tests are performed now by this mdro()
function makes sure that results from before 2016 and after 2016 are identical.
Currently supported guidelines are (case-insensitive):
Please suggest your own (country-specific) guidelines by letting us know: https://github.com/msberends/AMR/issues/new.
+Custom guidelines can be set with the custom_mdro_guideline()
function. This is of great importance if you have custom rules to determine MDROs in your hospital, e.g., rules that are dependent on ward, state of contact isolation or other variables in your data.
If you are familiar with case_when()
of the dplyr
package, you will recognise the input method to set your own rules. Rules must be set using what R considers to be the 'formula notation':
custom <- custom_mdro_guideline("CIP == 'R' & age > 60" ~ "Elderly Type A", - "ERY == 'R' & age > 60" ~ "Elderly Type B") +If you are familiar with
case_when()
of thedplyr
package, you will recognise the input method to set your own rules. Rules must be set using what R considers to be the 'formula notation':custom <- custom_mdro_guideline(CIP == "R" & age > 60 ~ "Elderly Type A", + ERY == "R" & age > 60 ~ "Elderly Type B")If a row/an isolate matches the first rule, the value after the first
~
(in this case 'Elderly Type A') will be set as MDRO value. Otherwise, the second rule will be tried and so on. The number of rules is unlimited.You can print the rules set in the console for an overview. Colours will help reading it if your console supports colours.
custom #> A set of custom MDRO rules: -#> 1. CIP == "R" & age > 60 -> "Elderly Type A" -#> 2. ERY == "R" & age > 60 -> "Elderly Type B" -#> 3. Otherwise -> "Negative" +#> 1. CIP is "R" and age is higher than 60 -> Elderly Type A +#> 2. ERY is "R" and age is higher than 60 -> Elderly Type B +#> 3. Otherwise -> Negative #> #> Unmatched rows will return NA.The outcome of the function can be used for the
guideline
argument in themdro()
function:x <- mdro(example_isolates, guideline = custom) table(x) +#> Elderly Type A Elderly Type B Negative +#> 43 891 1066The rules set (the
- -custom
object in this case) could be exported to a shared file location usingsaveRDS()
if you collaborate with multiple users. The custom rules set could then be imported usingreadRDS()
,Stable lifecycle
+Stable Lifecycle
@@ -395,7 +404,7 @@ A microorganism is categorised as Susceptible, Increased exposure when
This AMR package honours this new insight. Use susceptibility()
(equal to proportion_SI()
) to determine antimicrobial susceptibility and count_susceptible()
(equal to count_SI()
) to count susceptible isolates.
mdro(example_isolates, guideline = "EUCAST") mdro(example_isolates, - guideline = custom_mdro_guideline("AMX == 'R'" ~ "Custom MDRO 1", - "VAN == 'R'" ~ "Custom MDRO 2")) + guideline = custom_mdro_guideline(AMX == "R" ~ "Custom MDRO 1", + VAN == "R" ~ "Custom MDRO 2")) # \donttest{ if (require("dplyr")) { diff --git a/docs/reference/microorganisms.codes.html b/docs/reference/microorganisms.codes.html index 2b7069bb..1932c7ec 100644 --- a/docs/reference/microorganisms.codes.html +++ b/docs/reference/microorganisms.codes.html @@ -6,7 +6,7 @@ -Data set with 5,580 common microorganism codes — microorganisms.codes • AMR (for R) +Data Set with 5,580 Common Microorganism Codes — microorganisms.codes • AMR (for R) @@ -48,7 +48,7 @@ - + @@ -82,7 +82,7 @@
R/data.R
microorganisms.codes.Rd
mo
ID of the microorganism in the microorganisms data set
This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, http://www.catalogueoflife.org). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, lpsn.dsmz.de). This supplementation is needed until the CoL+ project is finished, which we await.
Click here for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with catalogue_of_life_version()
.
R/data.R
microorganisms.Rd
rank
Text of the taxonomic rank of the microorganism, like "species"
or "genus"
ref
Author(s) and year of concerning scientific publication
species_id
ID of the species as used by the Catalogue of Life
source
Either "CoL", "DSMZ" (see Source) or "manually added"
source
Either "CoL", "DSMZ" (see Source) or "manually added"
prevalence
Prevalence of the microorganism, see as.mo()
snomed
SNOMED code of the microorganism. Use mo_snomed()
to retrieve it quickly, see mo_property()
.
This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, http://www.catalogueoflife.org). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, lpsn.dsmz.de). This supplementation is needed until the CoL+ project is finished, which we await.
Click here for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with catalogue_of_life_version()
.
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this AMR
package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find all download links on our website, which is automatically updated with every code change.
R/data.R
microorganisms.old.Rd
This package contains the complete taxonomic tree of almost all microorganisms (~70,000 species) from the authoritative and comprehensive Catalogue of Life (CoL, http://www.catalogueoflife.org). The CoL is the most comprehensive and authoritative global index of species currently available. Nonetheless, we supplemented the CoL data with data from the List of Prokaryotic names with Standing in Nomenclature (LPSN, lpsn.dsmz.de). This supplementation is needed until the CoL+ project is finished, which we await.
Click here for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with catalogue_of_life_version()
.
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this AMR
package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find all download links on our website, which is automatically updated with every code change.
R/mo_matching_score.R
mo_matching_score.Rd
The grouping into human pathogenic prevalence (\(p\)) is based on experience from several microbiological laboratories in the Netherlands in conjunction with international reports on pathogen prevalence. Group 1 (most prevalent microorganisms) consists of all microorganisms where the taxonomic class is Gammaproteobacteria or where the taxonomic genus is Enterococcus, Staphylococcus or Streptococcus. This group consequently contains all common Gram-negative bacteria, such as Pseudomonas and Legionella and all species within the order Enterobacterales. Group 2 consists of all microorganisms where the taxonomic phylum is Proteobacteria, Firmicutes, Actinobacteria or Sarcomastigophora, or where the taxonomic genus is Absidia, Acremonium, Actinotignum, Alternaria, Anaerosalibacter, Apophysomyces, Arachnia, Aspergillus, Aureobacterium, Aureobasidium, Bacteroides, Basidiobolus, Beauveria, Blastocystis, Branhamella, Calymmatobacterium, Candida, Capnocytophaga, Catabacter, Chaetomium, Chryseobacterium, Chryseomonas, Chrysonilia, Cladophialophora, Cladosporium, Conidiobolus, Cryptococcus, Curvularia, Exophiala, Exserohilum, Flavobacterium, Fonsecaea, Fusarium, Fusobacterium, Hendersonula, Hypomyces, Koserella, Lelliottia, Leptosphaeria, Leptotrichia, Malassezia, Malbranchea, Mortierella, Mucor, Mycocentrospora, Mycoplasma, Nectria, Ochroconis, Oidiodendron, Phoma, Piedraia, Pithomyces, Pityrosporum, Prevotella,\Pseudallescheria, Rhizomucor, Rhizopus, Rhodotorula, Scolecobasidium, Scopulariopsis, Scytalidium,Sporobolomyces, Stachybotrys, Stomatococcus, Treponema, Trichoderma, Trichophyton, Trichosporon, Tritirachium or Ureaplasma. Group 3 consists of all other microorganisms.
All matches are sorted descending on their matching score and for all user input values, the top match will be returned. This will lead to the effect that e.g., "E. coli"
will return the microbial ID of Escherichia coli (\(m = 0.688\), a highly prevalent microorganism found in humans) and not Entamoeba coli (\(m = 0.079\), a less prevalent microorganism in humans), although the latter would alphabetically come first.
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.
If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
-All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this AMR
package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find all download links on our website, which is automatically updated with every code change.
R/mo_property.R
mo_property.Rd
Use these functions to return a specific property of a microorganism based on the latest accepted taxonomy. All input values will be evaluated internally with as.mo()
, which makes it possible to use microbial abbreviations, codes and names as input. Please see Examples.
Use these functions to return a specific property of a microorganism based on the latest accepted taxonomy. All input values will be evaluated internally with as.mo()
, which makes it possible to use microbial abbreviations, codes and names as input. See Examples.
mo_name(x, language = get_locale(), ...) @@ -303,7 +303,7 @@x -+ any character (vector) that can be coerced to a valid microorganism code with
as.mo()
. Can be left blank for auto-guessing the column containing microorganism codes if used in a data set, please see Examples.any character (vector) that can be coerced to a valid microorganism code with
as.mo()
. Can be left blank for auto-guessing the column containing microorganism codes if used in a data set, see Examples.language @@ -353,14 +353,14 @@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.
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
+Stable Lifecycle
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
-Matching score for microorganisms
+Matching Score for Microorganisms
@@ -396,12 +396,12 @@ This package contains the complete taxonomic tree of almost all microorganisms (- -
Catalogue of Life: Annual Checklist (public online taxonomic database), http://www.catalogueoflife.org (check included annual version with
catalogue_of_life_version()
).Reference data publicly available
+Reference Data Publicly Available
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this
-AMR
package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find all download links on our website, which is automatically updated with every code change.Read more on our website!
+Read more on Our Website!
diff --git a/docs/reference/mo_source.html b/docs/reference/mo_source.html index a924a632..f9e35b02 100644 --- a/docs/reference/mo_source.html +++ b/docs/reference/mo_source.html @@ -6,7 +6,7 @@ -User-defined reference data set for microorganisms — mo_source • AMR (for R) +User-Defined Reference Data Set for Microorganisms — mo_source • AMR (for R) @@ -48,7 +48,7 @@ - + @@ -83,7 +83,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p @@ -234,7 +234,7 @@ This is the fastest way to have your organisation (or analysis) specific codes p@@ -234,13 +234,13 @@ resistance() should be used to calculate resistance, susceptibility() should be-@@ -256,7 +256,7 @@ This is the fastest way to have your organisation (or analysis) specific codes pUser-defined reference data set for microorganisms
+User-Defined Reference Data Set for Microorganisms
Source:R/mo_source.R
mo_source.Rd
path -+ location of your reference file, see Details. Can be
""
,NULL
orFALSE
to delete the reference file.location of your reference file, see Details. Can be
""
,NULL
orFALSE
to delete the reference file.- destination @@ -271,7 +271,7 @@ This is the fastest way to have your organisation (or analysis) specific codes pThe created compressed data file
"mo_source.rds"
will be used at default for MO determination (functionas.mo()
and consequently allmo_*
functions likemo_genus()
andmo_gramstain()
). The location and timestamp of the original file will be saved as an attribute to the compressed data file.The function
get_mo_source()
will return the data set by reading"mo_source.rds"
withreadRDS()
. If the original file has changed (by checking the location and timestamp of the original file), it will callset_mo_source()
to update the data file automatically if used in an interactive session.Reading an Excel file (
-.xlsx
) with only one row has a size of 8-9 kB. The compressed file created withset_mo_source()
will then have a size of 0.1 kB and can be read byget_mo_source()
in only a couple of microseconds (millionths of a second).How to setup
+How to Setup
@@ -331,14 +331,14 @@ This is the fastest way to have your organisation (or analysis) specific codes pIf the original file (in the previous case an Excel file) is moved or deleted, the
-mo_source.rds
file will be removed upon the next use ofas.mo()
or anymo_*
function.Stable lifecycle
+Stable Lifecycle
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
-Read more on our website!
+Read more on Our Website!
diff --git a/docs/reference/pca.html b/docs/reference/pca.html index 1a517f90..354cbeb9 100644 --- a/docs/reference/pca.html +++ b/docs/reference/pca.html @@ -82,7 +82,7 @@ @@ -311,12 +311,17 @@The
pca()
function takes a data.frame as input and performs the actual PCA with the R functionprcomp()
.The result of the
-pca()
function is a prcomp object, with an additional attributenon_numeric_cols
which is a vector with the column names of all columns that do not contain numeric values. These are probably the groups and labels, and will be used byggplot_pca()
.Maturing lifecycle
+Maturing Lifecycle
+
The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. Since this function needs wider usage and more extensive testing, you are very welcome to suggest changes at our repository or write us an email (see section 'Contact Us').Read more on Our Website!
+ + + +On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!
Examples
# `example_isolates` is a dataset available in the AMR package. diff --git a/docs/reference/plot.html b/docs/reference/plot.html index a462e4e3..3a5b8e25 100644 --- a/docs/reference/plot.html +++ b/docs/reference/plot.html @@ -6,7 +6,7 @@ -Plotting for classes rsi, mic and disk — plot • AMR (for R) +Plotting for Classes rsi, mic and disk — plot • AMR (for R) @@ -48,7 +48,7 @@ - + @@ -82,7 +82,7 @@ @@ -233,7 +233,7 @@Stable lifecycle
+Stable Lifecycle
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
-Read more on our website!
+Read more on Our Website!
diff --git a/docs/reference/proportion.html b/docs/reference/proportion.html index 2fd9dbcc..2c9d9268 100644 --- a/docs/reference/proportion.html +++ b/docs/reference/proportion.html @@ -6,7 +6,7 @@ -Calculate microbial resistance — proportion • AMR (for R) +Calculate Microbial Resistance — proportion • AMR (for R) @@ -48,8 +48,8 @@ - - + @@ -83,7 +83,7 @@ resistance() should be used to calculate resistance, susceptibility() should be@@ -233,7 +233,7 @@-Calculate microbial resistance
+Calculate Microbial Resistance
Source:R/proportion.R
,R/rsi_df.R
proportion.Rd
-@@ -283,11 +283,11 @@ resistance() should be used to calculate resistance, susceptibility() should beThese functions can be used to calculate the (co-)resistance or susceptibility of microbial isolates (i.e. percentage of S, SI, I, IR or R). All functions support quasiquotation with pipes, can be used in
+summarise()
from thedplyr
package and also support grouped variables, please see Examples.These functions can be used to calculate the (co-)resistance or susceptibility of microbial isolates (i.e. percentage of S, SI, I, IR or R). All functions support quasiquotation with pipes, can be used in
summarise()
from thedplyr
package and also support grouped variables, see Examples.
resistance()
should be used to calculate resistance,susceptibility()
should be used to calculate susceptibility.... -+ one or more vectors (or columns) with antibiotic interpretations. They will be transformed internally with
as.rsi()
if needed. Use multiple columns to calculate (the lack of) co-resistance: the probability where one of two drugs have a resistant or susceptible result. See Examples.one or more vectors (or columns) with antibiotic interpretations. They will be transformed internally with
as.rsi()
if needed. Use multiple columns to calculate (the lack of) co-resistance: the probability where one of two drugs have a resistant or susceptible result. See Examples.minimum -+ the minimum allowed number of available (tested) isolates. Any isolate count lower than
minimum
will returnNA
with a warning. The default number of30
isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see Source.the minimum allowed number of available (tested) isolates. Any isolate count lower than
minimum
will returnNA
with a warning. The default number of30
isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see Source.as_percent @@ -295,7 +295,7 @@ resistance() should be used to calculate resistance, susceptibility() should beonly_all_tested -+ (for combination therapies, i.e. using more than one variable for
...
): a logical to indicate that isolates must be tested for all antibiotics, see section Combination therapy below(for combination therapies, i.e. using more than one variable for
...
): a logical to indicate that isolates must be tested for all antibiotics, see section Combination Therapy belowdata @@ -331,7 +331,7 @@ resistance() should be used to calculate resistance, susceptibility() should beRemember that you should filter your table to let it contain only first isolates! This is needed to exclude duplicates and to reduce selection bias. Use
first_isolate()
to determine them in your data set.These functions are not meant to count isolates, but to calculate the proportion of resistance/susceptibility. Use the
count()
functions to count isolates. The functionsusceptibility()
is essentially equal tocount_susceptible() / count_all()
. Low counts can influence the outcome - theproportion
functions may camouflage this, since they only return the proportion (albeit being dependent on theminimum
argument).The function
-proportion_df()
takes any variable fromdata
that has anrsi
class (created withas.rsi()
) and calculates the proportions R, I and S. It also supports grouped variables. The functionrsi_df()
works exactly likeproportion_df()
, but adds the number of isolates.Combination therapy
+Combination Therapy
@@ -362,7 +362,7 @@ resistance() should be used to calculate resistance, susceptibility() should beUsing
-only_all_tested
has no impact when only using one antibiotic as input.Stable lifecycle
+Stable Lifecycle
@@ -383,7 +383,7 @@ A microorganism is categorised as Susceptible, Increased exposure whenThis AMR package honours this new insight. Use
-susceptibility()
(equal toproportion_SI()
) to determine antimicrobial susceptibility andcount_susceptible()
(equal tocount_SI()
) to count susceptible isolates.Read more on our website!
+Read more on Our Website!
diff --git a/docs/reference/random.html b/docs/reference/random.html index 5ee97d67..5058efc8 100644 --- a/docs/reference/random.html +++ b/docs/reference/random.html @@ -6,7 +6,7 @@ -Random MIC values/disk zones/RSI generation — random • AMR (for R) +Random MIC Values/Disk Zones/RSI Generation — random • AMR (for R) @@ -48,7 +48,7 @@ - + @@ -82,7 +82,7 @@ @@ -233,7 +233,7 @@@@ -315,7 +315,7 @@-@@ -280,13 +280,13 @@Random MIC values/disk zones/RSI generation
+Random MIC Values/Disk Zones/RSI Generation
Source:R/random.R
random.Rd
The base R function
sample()
is used for generating values.Generated values are based on the latest EUCAST guideline implemented in the rsi_translation data set. To create specific generated values per bug or drug, set the
-mo
and/orab
argument.Maturing lifecycle
+Maturing Lifecycle
-
The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. Since this function needs wider usage and more extensive testing, you are very welcome to suggest changes at our repository or write us an email (see section 'Contact Us').Read more on our website!
+Read more on Our Website!
diff --git a/docs/reference/resistance_predict.html b/docs/reference/resistance_predict.html index 5e9bb45c..ae871da0 100644 --- a/docs/reference/resistance_predict.html +++ b/docs/reference/resistance_predict.html @@ -82,7 +82,7 @@model -+ the statistical model of choice. This could be a generalised linear regression model with binomial distribution (i.e. using `glm(..., family = binomial)``, assuming that a period of zero resistance was followed by a period of increasing resistance leading slowly to more and more resistance. See Details for all valid options.
the statistical model of choice. This could be a generalised linear regression model with binomial distribution (i.e. using `glm(..., family = binomial)``, assuming that a period of zero resistance was followed by a period of increasing resistance leading slowly to more and more resistance. See Details for all valid options.
- I_as_S @@ -355,7 +355,7 @@- -
estimated
, the estimated resistant percentages, calculated by the modelFurthermore, the model itself is available as an attribute:
+attributes(x)$model
, please see Examples.Furthermore, the model itself is available as an attribute:
attributes(x)$model
, see Examples.Details
Valid options for the statistical model (argument
model
) are:@@ -364,7 +364,7 @@
-
"lin"
or"linear"
: a linear regression modelMaturing lifecycle
+Maturing Lifecycle
@@ -384,7 +384,7 @@ A microorganism is categorised as Susceptible, Increased exposure whenThis AMR package honours this new insight. Use
-susceptibility()
(equal toproportion_SI()
) to determine antimicrobial susceptibility andcount_susceptible()
(equal tocount_SI()
) to count susceptible isolates.Read more on our website!
+Read more on Our Website!
diff --git a/docs/reference/rsi_translation.html b/docs/reference/rsi_translation.html index cc8c9739..8fd79c76 100644 --- a/docs/reference/rsi_translation.html +++ b/docs/reference/rsi_translation.html @@ -6,7 +6,7 @@ -Data set for R/SI interpretation — rsi_translation • AMR (for R) +Data Set for R/SI Interpretation — rsi_translation • AMR (for R) @@ -48,7 +48,7 @@ - + @@ -82,7 +82,7 @@ @@ -233,7 +233,7 @@@@ -234,7 +234,7 @@ When negative ('left-skewed'): the left tail is longer; the mass of the distribu-@@ -263,12 +263,12 @@Data set for R/SI interpretation
+Data Set for R/SI Interpretation
Source:R/data.R
rsi_translation.Rd
Details
The repository of this
-AMR
package contains a file comprising this exact data set: https://github.com/msberends/AMR/blob/master/data-raw/rsi_translation.txt. This file allows for machine reading EUCAST and CLSI guidelines, which is almost impossible with the Excel and PDF files distributed by EUCAST and CLSI. The file is updated automatically.Reference data publicly available
+Reference Data Publicly Available
All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this
-AMR
package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find all download links on our website, which is automatically updated with every code change.Read more on our website!
+Read more on Our Website!
diff --git a/docs/reference/skewness.html b/docs/reference/skewness.html index 60bbe35c..35a7ee41 100644 --- a/docs/reference/skewness.html +++ b/docs/reference/skewness.html @@ -6,7 +6,7 @@ -Skewness of the sample — skewness • AMR (for R) +Skewness of the Sample — skewness • AMR (for R) @@ -48,7 +48,7 @@ - + @@ -83,7 +83,7 @@ When negative ('left-skewed'): the left tail is longer; the mass of the distribu@@ -268,14 +268,14 @@ When negative ('left-skewed'): the left tail is longer; the mass of the distribuStable lifecycle
+Stable Lifecycle
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
-Read more on our website!
+Read more on Our Website!
diff --git a/docs/reference/translate.html b/docs/reference/translate.html index f195c4e9..19ddf4e0 100644 --- a/docs/reference/translate.html +++ b/docs/reference/translate.html @@ -6,7 +6,7 @@ -Translate strings from AMR package — translate • AMR (for R) +Translate Strings from AMR Package — translate • AMR (for R) @@ -48,7 +48,7 @@ - + @@ -82,7 +82,7 @@diff --git a/man/AMR-deprecated.Rd b/man/AMR-deprecated.Rd index 86e9d21d..a0da3938 100644 --- a/man/AMR-deprecated.Rd +++ b/man/AMR-deprecated.Rd @@ -3,20 +3,20 @@ \name{AMR-deprecated} \alias{AMR-deprecated} \alias{p_symbol} -\title{Deprecated functions} +\title{Deprecated Functions} \usage{ p_symbol(p, emptychar = " ") } \description{ These functions are so-called '\link{Deprecated}'. They will be removed in a future release. Using the functions will give a warning with the name of the function it has been replaced by (if there is one). } -\section{Retired lifecycle}{ +\section{Retired Lifecycle}{ \if{html}{\figure{lifecycle_retired.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{retired}. A retired function is no longer under active development, and (if appropiate) a better alternative is available. No new arguments will be added, and only the most critical bugs will be fixed. In a future version, this function will be removed. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/AMR.Rd b/man/AMR.Rd index ddee8427..2e383a61 100644 --- a/man/AMR.Rd +++ b/man/AMR.Rd @@ -33,12 +33,12 @@ This package can be used for: \item Principal component analysis for AMR } } -\section{Reference data publicly available}{ +\section{Reference Data Publicly Available}{ All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{AMR} package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/WHOCC.Rd b/man/WHOCC.Rd index eeff0ce0..327fb91d 100644 --- a/man/WHOCC.Rd +++ b/man/WHOCC.Rd @@ -18,7 +18,7 @@ The WHOCC is located in Oslo at the Norwegian Institute of Public Health and fun \strong{NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package.} See \url{https://www.whocc.no/copyright_disclaimer/.} } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/WHONET.Rd b/man/WHONET.Rd index a25d90c6..ae3439a4 100644 --- a/man/WHONET.Rd +++ b/man/WHONET.Rd @@ -3,7 +3,7 @@ \docType{data} \name{WHONET} \alias{WHONET} -\title{Data set with 500 isolates - WHONET example} +\title{Data Set with 500 Isolates - WHONET Example} \format{ A \link{data.frame} with 500 observations and 53 variables: \itemize{ @@ -41,12 +41,12 @@ WHONET \description{ This example data set has the exact same structure as an export file from WHONET. Such files can be used with this package, as this example data set shows. The antibiotic results are from our \link{example_isolates} data set. All patient names are created using online surname generators and are only in place for practice purposes. } -\section{Reference data publicly available}{ +\section{Reference Data Publicly Available}{ All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{AMR} package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/ab_from_text.Rd b/man/ab_from_text.Rd index f5431f7f..cb52462d 100644 --- a/man/ab_from_text.Rd +++ b/man/ab_from_text.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/ab_from_text.R \name{ab_from_text} \alias{ab_from_text} -\title{Retrieve antimicrobial drug names and doses from clinical text} +\title{Retrieve Antimicrobial Drug Names and Doses from Clinical Text} \usage{ ab_from_text( text, @@ -54,13 +54,13 @@ With using \code{collapse}, this function will return a \link{character}:\cr \code{df \%>\% mutate(abx = ab_from_text(clinical_text, collapse = "|"))} } } -\section{Maturing lifecycle}{ +\section{Maturing Lifecycle}{ \if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. Since this function needs wider usage and more extensive testing, you are very welcome \href{https://github.com/msberends/AMR/issues}{to suggest changes at our repository} or \link[=AMR]{write us an email (see section 'Contact Us')}. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/ab_property.Rd b/man/ab_property.Rd index 88373c8c..997d4186 100644 --- a/man/ab_property.Rd +++ b/man/ab_property.Rd @@ -15,7 +15,7 @@ \alias{ab_ddd} \alias{ab_info} \alias{ab_url} -\title{Get properties of an antibiotic} +\title{Get Properties of an Antibiotic} \usage{ ab_name(x, language = get_locale(), tolower = FALSE, ...) @@ -54,7 +54,7 @@ ab_property(x, property = "name", language = get_locale(), ...) \item{administration}{way of administration, either \code{"oral"} or \code{"iv"}} -\item{units}{a logical to indicate whether the units instead of the DDDs itself must be returned, see Examples} +\item{units}{a logical to indicate whether the units instead of the DDDs itself must be returned, see \emph{Examples}} \item{open}{browse the URL using \code{\link[utils:browseURL]{utils::browseURL()}}} @@ -76,7 +76,7 @@ All output will be \link{translate}d 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. } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -93,12 +93,12 @@ WHONET 2019 software: \url{http://www.whonet.org/software.html} European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: \url{http://ec.europa.eu/health/documents/community-register/html/atc.htm} } -\section{Reference data publicly available}{ +\section{Reference Data Publicly Available}{ All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{AMR} package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/age.Rd b/man/age.Rd index 4a642bb4..76fc72c5 100644 --- a/man/age.Rd +++ b/man/age.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/age.R \name{age} \alias{age} -\title{Age in years of individuals} +\title{Age in Years of Individuals} \usage{ age(x, reference = Sys.Date(), exact = FALSE, na.rm = FALSE, ...) } @@ -26,7 +26,7 @@ Calculates age in years based on a reference date, which is the sytem date at de \details{ Ages below 0 will be returned as \code{NA} with a warning. Ages above 120 will only give a warning. } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -34,7 +34,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/age_groups.Rd b/man/age_groups.Rd index 2af8d7a6..ca2d332e 100644 --- a/man/age_groups.Rd +++ b/man/age_groups.Rd @@ -2,14 +2,14 @@ % Please edit documentation in R/age.R \name{age_groups} \alias{age_groups} -\title{Split ages into age groups} +\title{Split Ages into Age Groups} \usage{ age_groups(x, split_at = c(12, 25, 55, 75), na.rm = FALSE) } \arguments{ \item{x}{age, e.g. calculated with \code{\link[=age]{age()}}} -\item{split_at}{values to split \code{x} at, defaults to age groups 0-11, 12-24, 25-54, 55-74 and 75+. See Details.} +\item{split_at}{values to split \code{x} at, defaults to age groups 0-11, 12-24, 25-54, 55-74 and 75+. See \emph{Details}.} \item{na.rm}{a \link{logical} to indicate whether missing values should be removed} } @@ -33,7 +33,7 @@ The default is to split on young children (0-11), youth (12-24), young adults (2 } } } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -41,7 +41,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/antibiotic_class_selectors.Rd b/man/antibiotic_class_selectors.Rd index f5fdd2b9..b34778a1 100644 --- a/man/antibiotic_class_selectors.Rd +++ b/man/antibiotic_class_selectors.Rd @@ -16,7 +16,7 @@ \alias{macrolides} \alias{penicillins} \alias{tetracyclines} -\title{Antibiotic class selectors} +\title{Antibiotic Class Selectors} \usage{ ab_class(ab_class) @@ -57,12 +57,20 @@ These functions help to select the columns of antibiotics that are of a specific All columns will be searched for known antibiotic names, abbreviations, brand names and codes (ATC, EARS-Net, WHO, etc.) in the \link{antibiotics} data set. This means that a selector like e.g. \code{\link[=aminoglycosides]{aminoglycosides()}} will pick up column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc. } -\section{Reference data publicly available}{ +\section{Stable Lifecycle}{ + +\if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} +The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. + +If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. +} + +\section{Reference Data Publicly Available}{ All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{AMR} package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/antibiotics.Rd b/man/antibiotics.Rd index 36df2a43..ee11d228 100644 --- a/man/antibiotics.Rd +++ b/man/antibiotics.Rd @@ -4,7 +4,7 @@ \name{antibiotics} \alias{antibiotics} \alias{antivirals} -\title{Data sets with 558 antimicrobials} +\title{Data Sets with 558 Antimicrobials} \format{ \subsection{For the \link{antibiotics} data set: a \link{data.frame} with 456 observations and 14 variables:}{ \itemize{ @@ -75,7 +75,7 @@ Files in \R format (with preserved data structure) can be found here: } } } -\section{Reference data publicly available}{ +\section{Reference Data Publicly Available}{ All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{AMR} package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change. } @@ -92,7 +92,7 @@ The WHOCC is located in Oslo at the Norwegian Institute of Public Health and fun \strong{NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package.} See \url{https://www.whocc.no/copyright_disclaimer/.} } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/as.ab.Rd b/man/as.ab.Rd index 0e9967aa..5df17856 100644 --- a/man/as.ab.Rd +++ b/man/as.ab.Rd @@ -4,7 +4,7 @@ \alias{as.ab} \alias{ab} \alias{is.ab} -\title{Transform input to an antibiotic ID} +\title{Transform Input to an Antibiotic ID} \usage{ as.ab(x, flag_multiple_results = TRUE, info = TRUE, ...) @@ -36,7 +36,7 @@ All these properties will be searched for the user input. The \code{\link[=as.ab \item Digitalised paper records, leaving artefacts like 0/o/O (zero and O's), B/8, n/r, etc. } -Use the \code{\link[=ab_property]{ab_*}} functions to get properties based on the returned antibiotic ID, see Examples. +Use the \code{\link[=ab_property]{ab_*}} functions to get properties based on the returned antibiotic ID, see \emph{Examples}. Note: the \code{\link[=as.ab]{as.ab()}} and \code{\link[=ab_property]{ab_*}} functions may use very long regular expression to match brand names of antimicrobial agents. This may fail on some systems. } @@ -49,7 +49,7 @@ WHONET 2019 software: \url{http://www.whonet.org/software.html} European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: \url{http://ec.europa.eu/health/documents/community-register/html/atc.htm} } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -69,12 +69,12 @@ The WHOCC is located in Oslo at the Norwegian Institute of Public Health and fun \strong{NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package.} See \url{https://www.whocc.no/copyright_disclaimer/.} } -\section{Reference data publicly available}{ +\section{Reference Data Publicly Available}{ All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{AMR} package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/as.disk.Rd b/man/as.disk.Rd index 4f782f5e..855413c1 100644 --- a/man/as.disk.Rd +++ b/man/as.disk.Rd @@ -4,7 +4,7 @@ \alias{as.disk} \alias{disk} \alias{is.disk} -\title{Transform input to disk diffusion diameters} +\title{Transform Input to Disk Diffusion Diameters} \usage{ as.disk(x, na.rm = FALSE) @@ -24,7 +24,7 @@ This transforms a vector to a new class \code{\link{disk}}, which is a disk diff \details{ Interpret disk values as RSI values with \code{\link[=as.rsi]{as.rsi()}}. It supports guidelines from EUCAST and CLSI. } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -32,7 +32,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/as.mic.Rd b/man/as.mic.Rd index 615169c1..d5ca3ae0 100755 --- a/man/as.mic.Rd +++ b/man/as.mic.Rd @@ -4,7 +4,7 @@ \alias{as.mic} \alias{mic} \alias{is.mic} -\title{Transform input to minimum inhibitory concentrations (MIC)} +\title{Transform Input to Minimum Inhibitory Concentrations (MIC)} \usage{ as.mic(x, na.rm = FALSE) @@ -24,7 +24,7 @@ This transforms a vector to a new class \code{\link{mic}}, which is an ordered \ \details{ To interpret MIC values as RSI values, use \code{\link[=as.rsi]{as.rsi()}} on MIC values. It supports guidelines from EUCAST and CLSI. } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -32,7 +32,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/as.mo.Rd b/man/as.mo.Rd index 3e20cf9b..5d85beb5 100644 --- a/man/as.mo.Rd +++ b/man/as.mo.Rd @@ -7,7 +7,7 @@ \alias{mo_failures} \alias{mo_uncertainties} \alias{mo_renamed} -\title{Transform input to a microorganism ID} +\title{Transform Input to a Microorganism ID} \usage{ as.mo( x, @@ -39,7 +39,7 @@ This excludes \emph{Staphylococcus aureus} at default, use \code{Becker = "all"} This excludes \emph{Enterococci} at default (who are in group D), use \code{Lancefield = "all"} to also categorise all \emph{Enterococci} as group D.} -\item{allow_uncertain}{a number between \code{0} (or \code{"none"}) and \code{3} (or \code{"all"}), or \code{TRUE} (= \code{2}) or \code{FALSE} (= \code{0}) to indicate whether the input should be checked for less probable results, please see \emph{Details}} +\item{allow_uncertain}{a number between \code{0} (or \code{"none"}) and \code{3} (or \code{"all"}), or \code{TRUE} (= \code{2}) or \code{FALSE} (= \code{0}) to indicate whether the input should be checked for less probable results, see \emph{Details}} \item{reference_df}{a \link{data.frame} to be used for extra reference when translating \code{x} to a valid \code{\link{mo}}. See \code{\link[=set_mo_source]{set_mo_source()}} and \code{\link[=get_mo_source]{get_mo_source()}} to automate the usage of your own codes (e.g. used in your analysis or organisation).} @@ -53,10 +53,10 @@ This excludes \emph{Enterococci} at default (who are in group D), use \code{Lanc A \link{character} \link{vector} with additional class \code{\link{mo}} } \description{ -Use this function to determine a valid microorganism ID (\code{\link{mo}}). Determination is done using intelligent rules and the complete taxonomic kingdoms Bacteria, Chromista, Protozoa, Archaea and most microbial species from the kingdom Fungi (see Source). The input can be almost anything: a full name (like \code{"Staphylococcus aureus"}), an abbreviated name (such as \code{"S. aureus"}), an abbreviation known in the field (such as \code{"MRSA"}), or just a genus. Please see \emph{Examples}. +Use this function to determine a valid microorganism ID (\code{\link{mo}}). Determination is done using intelligent rules and the complete taxonomic kingdoms Bacteria, Chromista, Protozoa, Archaea and most microbial species from the kingdom Fungi (see \emph{Source}). The input can be almost anything: a full name (like \code{"Staphylococcus aureus"}), an abbreviated name (such as \code{"S. aureus"}), an abbreviation known in the field (such as \code{"MRSA"}), or just a genus. See \emph{Examples}. } \details{ -\subsection{General info}{ +\subsection{General Info}{ A microorganism ID from this package (class: \code{\link{mo}}) is human readable and typically looks like these examples:\preformatted{ Code Full name --------------- -------------------------------------- @@ -74,7 +74,7 @@ A microorganism ID from this package (class: \code{\link{mo}}) is human readable Values that cannot be coerced will be considered 'unknown' and will get the MO code \code{UNKNOWN}. -Use the \code{\link[=mo_property]{mo_*}} functions to get properties based on the returned code, see Examples. +Use the \code{\link[=mo_property]{mo_*}} functions to get properties based on the returned code, see \emph{Examples}. The algorithm uses data from the Catalogue of Life (see below) and from one other source (see \link{microorganisms}). @@ -88,7 +88,7 @@ The \code{\link[=as.mo]{as.mo()}} function uses several coercion rules for fast This will lead to the effect that e.g. \code{"E. coli"} (a microorganism highly prevalent in humans) will return the microbial ID of \emph{Escherichia coli} and not \emph{Entamoeba coli} (a microorganism less prevalent in humans), although the latter would alphabetically come first. } -\subsection{Coping with uncertain results}{ +\subsection{Coping with Uncertain Results}{ In addition, the \code{\link[=as.mo]{as.mo()}} function can differentiate four levels of uncertainty to guess valid results: \itemize{ @@ -109,15 +109,15 @@ With the default setting (\code{allow_uncertain = TRUE}, level 2), below example There are three helper functions that can be run after using the \code{\link[=as.mo]{as.mo()}} function: \itemize{ -\item Use \code{\link[=mo_uncertainties]{mo_uncertainties()}} to get a \link{data.frame} that prints in a pretty format with all taxonomic names that were guessed. The output contains the matching score for all matches (see \emph{Background on matching score}). +\item Use \code{\link[=mo_uncertainties]{mo_uncertainties()}} to get a \link{data.frame} that prints in a pretty format with all taxonomic names that were guessed. The output contains the matching score for all matches (see \emph{Matching Score for Microorganisms} below). \item Use \code{\link[=mo_failures]{mo_failures()}} to get a \link{character} \link{vector} with all values that could not be coerced to a valid value. \item Use \code{\link[=mo_renamed]{mo_renamed()}} to get a \link{data.frame} with all values that could be coerced based on old, previously accepted taxonomic names. } } -\subsection{Microbial prevalence of pathogens in humans}{ +\subsection{Microbial Prevalence of Pathogens in Humans}{ -The intelligent rules consider the prevalence of microorganisms in humans grouped into three groups, which is available as the \code{prevalence} columns in the \link{microorganisms} and \link{microorganisms.old} data sets. The grouping into human pathogenic prevalence is explained in the section \emph{Matching score for microorganisms} below. +The intelligent rules consider the prevalence of microorganisms in humans grouped into three groups, which is available as the \code{prevalence} columns in the \link{microorganisms} and \link{microorganisms.old} data sets. The grouping into human pathogenic prevalence is explained in the section \emph{Matching Score for Microorganisms} below. } } \section{Source}{ @@ -131,7 +131,7 @@ The intelligent rules consider the prevalence of microorganisms in humans groupe } } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -139,7 +139,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } -\section{Matching score for microorganisms}{ +\section{Matching Score for Microorganisms}{ With ambiguous user input in \code{\link[=as.mo]{as.mo()}} and all the \code{\link[=mo_property]{mo_*}} functions, the returned results are chosen based on their matching score using \code{\link[=mo_matching_score]{mo_matching_score()}}. This matching score \eqn{m}, is calculated as: @@ -168,12 +168,12 @@ This package contains the complete taxonomic tree of almost all microorganisms ( \link[=catalogue_of_life]{Click here} for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with \code{\link[=catalogue_of_life_version]{catalogue_of_life_version()}}. } -\section{Reference data publicly available}{ +\section{Reference Data Publicly Available}{ All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{AMR} package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/as.rsi.Rd b/man/as.rsi.Rd index a75d4638..2bf0eabe 100755 --- a/man/as.rsi.Rd +++ b/man/as.rsi.Rd @@ -8,7 +8,7 @@ \alias{as.rsi.mic} \alias{as.rsi.disk} \alias{as.rsi.data.frame} -\title{Interpret MIC and disk values, or clean raw R/SI data} +\title{Interpret MIC and Disk Values, or Clean Raw R/SI Data} \usage{ as.rsi(x, ...) @@ -55,13 +55,13 @@ is.rsi.eligible(x, threshold = 0.05) \item{...}{for using on a \link{data.frame}: names of columns to apply \code{\link[=as.rsi]{as.rsi()}} on (supports tidy selection like \code{AMX:VAN}). Otherwise: arguments passed on to methods.} -\item{threshold}{maximum fraction of invalid antimicrobial interpretations of \code{x}, please see \emph{Examples}} +\item{threshold}{maximum fraction of invalid antimicrobial interpretations of \code{x}, see \emph{Examples}} \item{mo}{any (vector of) text that can be coerced to a valid microorganism code with \code{\link[=as.mo]{as.mo()}}, will be determined automatically if the \code{dplyr} package is installed} \item{ab}{any (vector of) text that can be coerced to a valid antimicrobial code with \code{\link[=as.ab]{as.ab()}}} -\item{guideline}{defaults to the latest included EUCAST guideline, see Details for all options} +\item{guideline}{defaults to the latest included EUCAST guideline, see \emph{Details} for all options} \item{uti}{(Urinary Tract Infection) A vector with \link{logical}s (\code{TRUE} or \code{FALSE}) to specify whether a UTI specific interpretation from the guideline should be chosen. For using \code{\link[=as.rsi]{as.rsi()}} on a \link{data.frame}, this can also be a column containing \link{logical}s or when left blank, the data set will be searched for a 'specimen' and rows containing 'urin' (such as 'urine', 'urina') in that column will be regarded isolates from a UTI. See \emph{Examples}.} @@ -80,7 +80,7 @@ Ordered \link{factor} with new class \code{\link{rsi}} Interpret minimum inhibitory concentration (MIC) values and disk diffusion diameters according to EUCAST or CLSI, or clean up existing R/SI values. This transforms the input to a new class \code{\link{rsi}}, which is an ordered factor with levels \verb{S < I < R}. Values that cannot be interpreted will be returned as \code{NA} with a warning. } \details{ -\subsection{How it works}{ +\subsection{How it Works}{ The \code{\link[=as.rsi]{as.rsi()}} function works in four ways: \enumerate{ @@ -102,21 +102,21 @@ your_data \%>\% mutate(across(where(is.disk), as.rsi)) # since dplyr 1.0.0 } } -\subsection{Supported guidelines}{ +\subsection{Supported Guidelines}{ For interpreting MIC values as well as disk diffusion diameters, supported guidelines to be used as input for the \code{guideline} argument are: "CLSI 2010", "CLSI 2011", "CLSI 2012", "CLSI 2013", "CLSI 2014", "CLSI 2015", "CLSI 2016", "CLSI 2017", "CLSI 2018", "CLSI 2019", "EUCAST 2011", "EUCAST 2012", "EUCAST 2013", "EUCAST 2014", "EUCAST 2015", "EUCAST 2016", "EUCAST 2017", "EUCAST 2018", "EUCAST 2019", "EUCAST 2020", "EUCAST 2021". Simply using \code{"CLSI"} or \code{"EUCAST"} as input will automatically select the latest version of that guideline. You can set your own data set using the \code{reference_data} argument. The \code{guideline} argument will then be ignored. } -\subsection{After interpretation}{ +\subsection{After Interpretation}{ After using \code{\link[=as.rsi]{as.rsi()}}, you can use the \code{\link[=eucast_rules]{eucast_rules()}} defined by EUCAST to (1) apply inferred susceptibility and resistance based on results of other antimicrobials and (2) apply intrinsic resistance based on taxonomic properties of a microorganism. } -\subsection{Machine readable interpretation guidelines}{ +\subsection{Machine-Readable Interpretation Guidelines}{ -The repository of this package \href{https://github.com/msberends/AMR/blob/master/data-raw/rsi_translation.txt}{contains a machine readable version} of all guidelines. This is a CSV file consisting of 20,486 rows and 10 columns. This file is machine readable, since it contains one row for every unique combination of the test method (MIC or disk diffusion), the antimicrobial agent and the microorganism. \strong{This allows for easy implementation of these rules in laboratory information systems (LIS)}. Note that it only contains interpretation guidelines for humans - interpretation guidelines from CLSI for animals were removed. +The repository of this package \href{https://github.com/msberends/AMR/blob/master/data-raw/rsi_translation.txt}{contains a machine-readable version} of all guidelines. This is a CSV file consisting of 20,486 rows and 10 columns. This file is machine-readable, since it contains one row for every unique combination of the test method (MIC or disk diffusion), the antimicrobial agent and the microorganism. \strong{This allows for easy implementation of these rules in laboratory information systems (LIS)}. Note that it only contains interpretation guidelines for humans - interpretation guidelines from CLSI for animals were removed. } \subsection{Other}{ @@ -139,7 +139,7 @@ A microorganism is categorised as \emph{Susceptible, Increased exposure} when th This AMR package honours this new insight. Use \code{\link[=susceptibility]{susceptibility()}} (equal to \code{\link[=proportion_SI]{proportion_SI()}}) to determine antimicrobial susceptibility and \code{\link[=count_susceptible]{count_susceptible()}} (equal to \code{\link[=count_SI]{count_SI()}}) to count susceptible isolates. } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -147,12 +147,12 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } -\section{Reference data publicly available}{ +\section{Reference Data Publicly Available}{ All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{AMR} package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/atc_online.Rd b/man/atc_online.Rd index e3b612a1..857d5f4a 100644 --- a/man/atc_online.Rd +++ b/man/atc_online.Rd @@ -4,7 +4,7 @@ \alias{atc_online_property} \alias{atc_online_groups} \alias{atc_online_ddd} -\title{Get ATC properties from WHOCC website} +\title{Get ATC Properties from WHOCC Website} \source{ \url{https://www.whocc.no/atc_ddd_alterations__cumulative/ddd_alterations/abbrevations/} } @@ -24,9 +24,9 @@ atc_online_ddd(atc_code, ...) \arguments{ \item{atc_code}{a character or character vector with ATC code(s) of antibiotic(s)} -\item{property}{property of an ATC code. Valid values are \code{"ATC"}, \code{"Name"}, \code{"DDD"}, \code{"U"} (\code{"unit"}), \code{"Adm.R"}, \code{"Note"} and \code{groups}. For this last option, all hierarchical groups of an ATC code will be returned, see Examples.} +\item{property}{property of an ATC code. Valid values are \code{"ATC"}, \code{"Name"}, \code{"DDD"}, \code{"U"} (\code{"unit"}), \code{"Adm.R"}, \code{"Note"} and \code{groups}. For this last option, all hierarchical groups of an ATC code will be returned, see \emph{Examples}.} -\item{administration}{type of administration when using \code{property = "Adm.R"}, see Details} +\item{administration}{type of administration when using \code{property = "Adm.R"}, see \emph{Details}} \item{url}{url of website of the WHOCC. The sign \verb{\%s} can be used as a placeholder for ATC codes.} @@ -66,7 +66,7 @@ Abbreviations of return values when using \code{property = "U"} (unit): \strong{N.B. This function requires an internet connection and only works if the following packages are installed: \code{curl}, \code{rvest}, \code{xml2}.} } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -74,7 +74,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/availability.Rd b/man/availability.Rd index 59aff104..b60c20fd 100644 --- a/man/availability.Rd +++ b/man/availability.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/availability.R \name{availability} \alias{availability} -\title{Check availability of columns} +\title{Check Availability of Columns} \usage{ availability(tbl, width = NULL) } @@ -20,7 +20,7 @@ Easy check for data availability of all columns in a data set. This makes it eas \details{ The function returns a \link{data.frame} with columns \code{"resistant"} and \code{"visual_resistance"}. The values in that columns are calculated with \code{\link[=resistance]{resistance()}}. } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -28,7 +28,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/bug_drug_combinations.Rd b/man/bug_drug_combinations.Rd index 0849b7b0..131561e9 100644 --- a/man/bug_drug_combinations.Rd +++ b/man/bug_drug_combinations.Rd @@ -3,7 +3,7 @@ \name{bug_drug_combinations} \alias{bug_drug_combinations} \alias{format.bug_drug_combinations} -\title{Determine bug-drug combinations} +\title{Determine Bug-Drug Combinations} \source{ \strong{M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition}, 2014, \emph{Clinical and Laboratory Standards Institute (CLSI)}. \url{https://clsi.org/standards/products/microbiology/documents/m39/}. } @@ -37,7 +37,7 @@ bug_drug_combinations(x, col_mo = NULL, FUN = mo_shortname, ...) \item{language}{language of the returned text, defaults to system language (see \code{\link[=get_locale]{get_locale()}}) and can also be set with \code{getOption("AMR_locale")}. Use \code{language = NULL} or \code{language = ""} to prevent translation.} -\item{minimum}{the minimum allowed number of available (tested) isolates. Any isolate count lower than \code{minimum} will return \code{NA} with a warning. The default number of \code{30} isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see Source.} +\item{minimum}{the minimum allowed number of available (tested) isolates. Any isolate count lower than \code{minimum} will return \code{NA} with a warning. The default number of \code{30} isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see \emph{Source}.} \item{combine_SI}{a logical to indicate whether all values of S and I must be merged into one, so the output only consists of S+I vs. R (susceptible vs. resistant). This used to be the argument \code{combine_IR}, but this now follows the redefinition by EUCAST about the interpretation of I (increased exposure) in 2019, see section 'Interpretation of S, I and R' below. Default is \code{TRUE}.} @@ -58,12 +58,12 @@ bug_drug_combinations(x, col_mo = NULL, FUN = mo_shortname, ...) The function \code{\link[=bug_drug_combinations]{bug_drug_combinations()}} returns a \link{data.frame} with columns "mo", "ab", "S", "I", "R" and "total". } \description{ -Determine antimicrobial resistance (AMR) of all bug-drug combinations in your data set where at least 30 (default) isolates are available per species. Use \code{\link[=format]{format()}} on the result to prettify it to a publicable/printable format, see Examples. +Determine antimicrobial resistance (AMR) of all bug-drug combinations in your data set where at least 30 (default) isolates are available per species. Use \code{\link[=format]{format()}} on the result to prettify it to a publicable/printable format, see \emph{Examples}. } \details{ The function \code{\link[=format]{format()}} calculates the resistance per bug-drug combination. Use \code{combine_IR = FALSE} (default) to test R vs. S+I and \code{combine_IR = TRUE} to test R+I vs. S. } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -71,7 +71,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/catalogue_of_life.Rd b/man/catalogue_of_life.Rd index cf5d6cd3..0233acd5 100644 --- a/man/catalogue_of_life.Rd +++ b/man/catalogue_of_life.Rd @@ -14,7 +14,7 @@ This package contains the complete taxonomic tree of almost all microorganisms ( \link[=catalogue_of_life]{Click here} for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with \code{\link[=catalogue_of_life_version]{catalogue_of_life_version()}}. } -\section{Included taxa}{ +\section{Included Taxa}{ Included are: \itemize{ @@ -31,7 +31,7 @@ The Catalogue of Life (\url{http://www.catalogueoflife.org}) is the most compreh The syntax used to transform the original data to a cleansed \R format, can be found here: \url{https://github.com/msberends/AMR/blob/master/data-raw/reproduction_of_microorganisms.R}. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/catalogue_of_life_version.Rd b/man/catalogue_of_life_version.Rd index 896f6c2c..a6a29988 100644 --- a/man/catalogue_of_life_version.Rd +++ b/man/catalogue_of_life_version.Rd @@ -23,7 +23,7 @@ This package contains the complete taxonomic tree of almost all microorganisms ( \link[=catalogue_of_life]{Click here} for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with \code{\link[=catalogue_of_life_version]{catalogue_of_life_version()}}. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/count.Rd b/man/count.Rd index 9c586a6f..1f7cb1ba 100644 --- a/man/count.Rd +++ b/man/count.Rd @@ -12,7 +12,7 @@ \alias{count_all} \alias{n_rsi} \alias{count_df} -\title{Count available isolates} +\title{Count Available Isolates} \usage{ count_resistant(..., only_all_tested = FALSE) @@ -43,7 +43,7 @@ count_df( \arguments{ \item{...}{one or more vectors (or columns) with antibiotic interpretations. They will be transformed internally with \code{\link[=as.rsi]{as.rsi()}} if needed.} -\item{only_all_tested}{(for combination therapies, i.e. using more than one variable for \code{...}): a logical to indicate that isolates must be tested for all antibiotics, see section \emph{Combination therapy} below} +\item{only_all_tested}{(for combination therapies, i.e. using more than one variable for \code{...}): a logical to indicate that isolates must be tested for all antibiotics, see section \emph{Combination Therapy} below} \item{data}{a \link{data.frame} containing columns with class \code{\link{rsi}} (see \code{\link[=as.rsi]{as.rsi()}})} @@ -59,7 +59,7 @@ count_df( An \link{integer} } \description{ -These functions can be used to count resistant/susceptible microbial isolates. All functions support quasiquotation with pipes, can be used in \code{summarise()} from the \code{dplyr} package and also support grouped variables, please see \emph{Examples}. +These functions can be used to count resistant/susceptible microbial isolates. All functions support quasiquotation with pipes, can be used in \code{summarise()} from the \code{dplyr} package and also support grouped variables, see \emph{Examples}. \code{\link[=count_resistant]{count_resistant()}} should be used to count resistant isolates, \code{\link[=count_susceptible]{count_susceptible()}} should be used to count susceptible isolates. } @@ -72,7 +72,7 @@ The function \code{\link[=n_rsi]{n_rsi()}} is an alias of \code{\link[=count_all The function \code{\link[=count_df]{count_df()}} takes any variable from \code{data} that has an \code{\link{rsi}} class (created with \code{\link[=as.rsi]{as.rsi()}}) and counts the number of S's, I's and R's. It also supports grouped variables. The function \code{\link[=rsi_df]{rsi_df()}} works exactly like \code{\link[=count_df]{count_df()}}, but adds the percentage of S, I and R. } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -95,7 +95,7 @@ A microorganism is categorised as \emph{Susceptible, Increased exposure} when th This AMR package honours this new insight. Use \code{\link[=susceptibility]{susceptibility()}} (equal to \code{\link[=proportion_SI]{proportion_SI()}}) to determine antimicrobial susceptibility and \code{\link[=count_susceptible]{count_susceptible()}} (equal to \code{\link[=count_SI]{count_SI()}}) to count susceptible isolates. } -\section{Combination therapy}{ +\section{Combination Therapy}{ When using more than one variable for \code{...} (= combination therapy), use \code{only_all_tested} to only count isolates that are tested for all antibiotics/variables that you test them for. See this example for two antibiotics, Drug A and Drug B, about how \code{\link[=susceptibility]{susceptibility()}} works to calculate the \%SI:\preformatted{-------------------------------------------------------------------- only_all_tested = FALSE only_all_tested = TRUE @@ -126,7 +126,7 @@ and that, in combination therapies, for \code{only_all_tested = FALSE} applies t Using \code{only_all_tested} has no impact when only using one antibiotic as input. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/dosage.Rd b/man/dosage.Rd index cf3f1929..fe0d9515 100644 --- a/man/dosage.Rd +++ b/man/dosage.Rd @@ -3,7 +3,7 @@ \docType{data} \name{dosage} \alias{dosage} -\title{Data set with treatment dosages as defined by EUCAST} +\title{Data Set with Treatment Dosages as Defined by EUCAST} \format{ A \link{data.frame} with 135 observations and 9 variables: \itemize{ @@ -27,12 +27,12 @@ EUCAST breakpoints used in this package are based on the dosages in this data se \details{ \href{https://www.eucast.org/clinical_breakpoints/}{'EUCAST Clinical Breakpoint Tables' v11.0} (2021) are based on the dosages in this data set. } -\section{Reference data publicly available}{ +\section{Reference Data Publicly Available}{ All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{AMR} package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/eucast_rules.Rd b/man/eucast_rules.Rd index 2aa95b7b..1caf4494 100644 --- a/man/eucast_rules.Rd +++ b/man/eucast_rules.Rd @@ -4,7 +4,7 @@ \alias{eucast_rules} \alias{EUCAST} \alias{eucast_dosage} -\title{Apply EUCAST rules} +\title{Apply EUCAST Rules} \source{ \itemize{ \item EUCAST Expert Rules. Version 2.0, 2012.\cr @@ -48,7 +48,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 susceptible (S) 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{Enterobacter, Klebsiella aerogenes, Citrobacter braakii, freundii, gillenii, murliniae, rodenticum, sedlakii, werkmanii, youngae, Hafnia alvei, Serratia, Morganella morganii, Providencia}.} -\item{...}{column name of an antibiotic, please see section \emph{Antibiotics} below} +\item{...}{column name of an antibiotic, see section \emph{Antibiotics} below} \item{ab}{any (vector of) text that can be coerced to a valid antibiotic code with \code{\link[=as.ab]{as.ab()}}} @@ -60,14 +60,14 @@ The input of \code{x}, possibly with edited values of antibiotics. Or, if \code{ \description{ Apply rules for clinical breakpoints and intrinsic resistance as defined by the European Committee on Antimicrobial Susceptibility Testing (EUCAST, \url{https://eucast.org}), see \emph{Source}. Use \code{\link[=eucast_dosage]{eucast_dosage()}} to get a \link{data.frame} with advised dosages of a certain bug-drug combination, which is based on the \link{dosage} data set. -To improve the interpretation of the antibiogram before EUCAST rules are applied, some non-EUCAST rules can applied at default, see Details. +To improve the interpretation of the antibiogram before EUCAST rules are applied, some non-EUCAST rules can applied at default, see \emph{Details}. } \details{ \strong{Note:} This function does not translate MIC values to RSI values. Use \code{\link[=as.rsi]{as.rsi()}} for that. \cr \strong{Note:} When ampicillin (AMP, J01CA01) is not available but amoxicillin (AMX, J01CA04) is, the latter will be used for all rules where there is a dependency on ampicillin. These drugs are interchangeable when it comes to expression of antimicrobial resistance. The file containing all EUCAST rules is located here: \url{https://github.com/msberends/AMR/blob/master/data-raw/eucast_rules.tsv}. -\subsection{'Other' rules}{ +\subsection{'Other' Rules}{ Before further processing, two non-EUCAST rules about drug combinations can be applied to improve the efficacy of the EUCAST rules, and the reliability of your data (analysis). These rules are: \enumerate{ @@ -89,7 +89,7 @@ The following antibiotics are used for the functions \code{\link[=eucast_rules]{ Amikacin (\code{AMK}, \href{https://www.whocc.no/atc_ddd_index/?code=J01GB06&showdescription=no}{J01GB06}), amoxicillin (\code{AMX}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CA04&showdescription=no}{J01CA04}), amoxicillin/clavulanic acid (\code{AMC}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CR02&showdescription=no}{J01CR02}), ampicillin (\code{AMP}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CA01&showdescription=no}{J01CA01}), ampicillin/sulbactam (\code{SAM}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CR01&showdescription=no}{J01CR01}), avoparcin (\code{AVO}, no ATC code), azithromycin (\code{AZM}, \href{https://www.whocc.no/atc_ddd_index/?code=J01FA10&showdescription=no}{J01FA10}), azlocillin (\code{AZL}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CA09&showdescription=no}{J01CA09}), aztreonam (\code{ATM}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DF01&showdescription=no}{J01DF01}), bacampicillin (\code{BAM}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CA06&showdescription=no}{J01CA06}), benzylpenicillin (\code{PEN}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CE01&showdescription=no}{J01CE01}), cadazolid (\code{CDZ}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD09&showdescription=no}{J01DD09}), carbenicillin (\code{CRB}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CA03&showdescription=no}{J01CA03}), carindacillin (\code{CRN}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CA05&showdescription=no}{J01CA05}), cefacetrile (\code{CAC}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DB10&showdescription=no}{J01DB10}), cefaclor (\code{CEC}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DC04&showdescription=no}{J01DC04}), cefadroxil (\code{CFR}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DB05&showdescription=no}{J01DB05}), cefaloridine (\code{RID}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DB02&showdescription=no}{J01DB02}), cefamandole (\code{MAN}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DC03&showdescription=no}{J01DC03}), cefatrizine (\code{CTZ}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DB07&showdescription=no}{J01DB07}), cefazedone (\code{CZD}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DB06&showdescription=no}{J01DB06}), cefazolin (\code{CZO}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DB04&showdescription=no}{J01DB04}), cefcapene (\code{CCP}, no ATC code), cefcapene pivoxil (\code{CCX}, no ATC code), cefdinir (\code{CDR}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD15&showdescription=no}{J01DD15}), cefditoren (\code{DIT}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD16&showdescription=no}{J01DD16}), cefditoren pivoxil (\code{DIX}, no ATC code), cefepime (\code{FEP}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DE01&showdescription=no}{J01DE01}), cefetamet (\code{CAT}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD10&showdescription=no}{J01DD10}), cefetamet pivoxil (\code{CPI}, no ATC code), cefixime (\code{CFM}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD08&showdescription=no}{J01DD08}), cefmenoxime (\code{CMX}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD05&showdescription=no}{J01DD05}), cefmetazole (\code{CMZ}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DC09&showdescription=no}{J01DC09}), cefodizime (\code{DIZ}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD09&showdescription=no}{J01DD09}), cefonicid (\code{CID}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DC06&showdescription=no}{J01DC06}), cefoperazone (\code{CFP}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD12&showdescription=no}{J01DD12}), cefoperazone/sulbactam (\code{CSL}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD62&showdescription=no}{J01DD62}), ceforanide (\code{CND}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DC11&showdescription=no}{J01DC11}), cefotaxime (\code{CTX}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD01&showdescription=no}{J01DD01}), cefotaxime/clavulanic acid (\code{CTC}, no ATC code), cefotaxime/sulbactam (\code{CTS}, no ATC code), cefotetan (\code{CTT}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DC05&showdescription=no}{J01DC05}), cefotiam (\code{CTF}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DC07&showdescription=no}{J01DC07}), cefotiam hexetil (\code{CHE}, no ATC code), cefovecin (\code{FOV}, no ATC code), cefoxitin (\code{FOX}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DC01&showdescription=no}{J01DC01}), cefoxitin screening (\code{FOX1}, no ATC code), cefpimizole (\code{CFZ}, no ATC code), cefpiramide (\code{CPM}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD11&showdescription=no}{J01DD11}), cefpirome (\code{CPO}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DE02&showdescription=no}{J01DE02}), cefpodoxime (\code{CPD}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD13&showdescription=no}{J01DD13}), cefpodoxime proxetil (\code{CPX}, no ATC code), cefpodoxime/clavulanic acid (\code{CDC}, no ATC code), cefprozil (\code{CPR}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DC10&showdescription=no}{J01DC10}), cefroxadine (\code{CRD}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DB11&showdescription=no}{J01DB11}), cefsulodin (\code{CFS}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD03&showdescription=no}{J01DD03}), ceftaroline (\code{CPT}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DI02&showdescription=no}{J01DI02}), ceftazidime (\code{CAZ}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD02&showdescription=no}{J01DD02}), ceftazidime/avibactam (\code{CZA}, no ATC code), ceftazidime/clavulanic acid (\code{CCV}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD52&showdescription=no}{J01DD52}), cefteram (\code{CEM}, no ATC code), cefteram pivoxil (\code{CPL}, no ATC code), ceftezole (\code{CTL}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DB12&showdescription=no}{J01DB12}), ceftibuten (\code{CTB}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD14&showdescription=no}{J01DD14}), ceftiofur (\code{TIO}, no ATC code), ceftizoxime (\code{CZX}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD07&showdescription=no}{J01DD07}), ceftizoxime alapivoxil (\code{CZP}, no ATC code), ceftobiprole (\code{BPR}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DI01&showdescription=no}{J01DI01}), ceftobiprole medocaril (\code{CFM1}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DI01&showdescription=no}{J01DI01}), ceftolozane/enzyme inhibitor (\code{CEI}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DI54&showdescription=no}{J01DI54}), ceftriaxone (\code{CRO}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD04&showdescription=no}{J01DD04}), cefuroxime (\code{CXM}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DC02&showdescription=no}{J01DC02}), cephalexin (\code{LEX}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DB01&showdescription=no}{J01DB01}), cephalothin (\code{CEP}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DB03&showdescription=no}{J01DB03}), cephapirin (\code{HAP}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DB08&showdescription=no}{J01DB08}), cephradine (\code{CED}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DB09&showdescription=no}{J01DB09}), chloramphenicol (\code{CHL}, \href{https://www.whocc.no/atc_ddd_index/?code=J01BA01&showdescription=no}{J01BA01}), ciprofloxacin (\code{CIP}, \href{https://www.whocc.no/atc_ddd_index/?code=J01MA02&showdescription=no}{J01MA02}), clarithromycin (\code{CLR}, \href{https://www.whocc.no/atc_ddd_index/?code=J01FA09&showdescription=no}{J01FA09}), clindamycin (\code{CLI}, \href{https://www.whocc.no/atc_ddd_index/?code=J01FF01&showdescription=no}{J01FF01}), colistin (\code{COL}, \href{https://www.whocc.no/atc_ddd_index/?code=J01XB01&showdescription=no}{J01XB01}), cycloserine (\code{CYC}, \href{https://www.whocc.no/atc_ddd_index/?code=J04AB01&showdescription=no}{J04AB01}), dalbavancin (\code{DAL}, \href{https://www.whocc.no/atc_ddd_index/?code=J01XA04&showdescription=no}{J01XA04}), daptomycin (\code{DAP}, \href{https://www.whocc.no/atc_ddd_index/?code=J01XX09&showdescription=no}{J01XX09}), dibekacin (\code{DKB}, \href{https://www.whocc.no/atc_ddd_index/?code=J01GB09&showdescription=no}{J01GB09}), dirithromycin (\code{DIR}, \href{https://www.whocc.no/atc_ddd_index/?code=J01FA13&showdescription=no}{J01FA13}), doripenem (\code{DOR}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DH04&showdescription=no}{J01DH04}), doxycycline (\code{DOX}, \href{https://www.whocc.no/atc_ddd_index/?code=J01AA02&showdescription=no}{J01AA02}), enoxacin (\code{ENX}, \href{https://www.whocc.no/atc_ddd_index/?code=J01MA04&showdescription=no}{J01MA04}), epicillin (\code{EPC}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CA07&showdescription=no}{J01CA07}), ertapenem (\code{ETP}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DH03&showdescription=no}{J01DH03}), erythromycin (\code{ERY}, \href{https://www.whocc.no/atc_ddd_index/?code=J01FA01&showdescription=no}{J01FA01}), fleroxacin (\code{FLE}, \href{https://www.whocc.no/atc_ddd_index/?code=J01MA08&showdescription=no}{J01MA08}), flucloxacillin (\code{FLC}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CF05&showdescription=no}{J01CF05}), flurithromycin (\code{FLR1}, \href{https://www.whocc.no/atc_ddd_index/?code=J01FA14&showdescription=no}{J01FA14}), fosfomycin (\code{FOS}, \href{https://www.whocc.no/atc_ddd_index/?code=J01XX01&showdescription=no}{J01XX01}), fusidic acid (\code{FUS}, \href{https://www.whocc.no/atc_ddd_index/?code=J01XC01&showdescription=no}{J01XC01}), gatifloxacin (\code{GAT}, \href{https://www.whocc.no/atc_ddd_index/?code=J01MA16&showdescription=no}{J01MA16}), gemifloxacin (\code{GEM}, \href{https://www.whocc.no/atc_ddd_index/?code=J01MA15&showdescription=no}{J01MA15}), gentamicin (\code{GEN}, \href{https://www.whocc.no/atc_ddd_index/?code=J01GB03&showdescription=no}{J01GB03}), grepafloxacin (\code{GRX}, \href{https://www.whocc.no/atc_ddd_index/?code=J01MA11&showdescription=no}{J01MA11}), hetacillin (\code{HET}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CA18&showdescription=no}{J01CA18}), imipenem (\code{IPM}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DH51&showdescription=no}{J01DH51}), isepamicin (\code{ISE}, \href{https://www.whocc.no/atc_ddd_index/?code=J01GB11&showdescription=no}{J01GB11}), josamycin (\code{JOS}, \href{https://www.whocc.no/atc_ddd_index/?code=J01FA07&showdescription=no}{J01FA07}), kanamycin (\code{KAN}, \href{https://www.whocc.no/atc_ddd_index/?code=J01GB04&showdescription=no}{J01GB04}), latamoxef (\code{LTM}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DD06&showdescription=no}{J01DD06}), levofloxacin (\code{LVX}, \href{https://www.whocc.no/atc_ddd_index/?code=J01MA12&showdescription=no}{J01MA12}), lincomycin (\code{LIN}, \href{https://www.whocc.no/atc_ddd_index/?code=J01FF02&showdescription=no}{J01FF02}), linezolid (\code{LNZ}, \href{https://www.whocc.no/atc_ddd_index/?code=J01XX08&showdescription=no}{J01XX08}), lomefloxacin (\code{LOM}, \href{https://www.whocc.no/atc_ddd_index/?code=J01MA07&showdescription=no}{J01MA07}), loracarbef (\code{LOR}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DC08&showdescription=no}{J01DC08}), mecillinam (Amdinocillin) (\code{MEC}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CA11&showdescription=no}{J01CA11}), meropenem (\code{MEM}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DH02&showdescription=no}{J01DH02}), meropenem/vaborbactam (\code{MEV}, \href{https://www.whocc.no/atc_ddd_index/?code=J01DH52&showdescription=no}{J01DH52}), metampicillin (\code{MTM}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CA14&showdescription=no}{J01CA14}), mezlocillin (\code{MEZ}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CA10&showdescription=no}{J01CA10}), midecamycin (\code{MID}, \href{https://www.whocc.no/atc_ddd_index/?code=J01FA03&showdescription=no}{J01FA03}), minocycline (\code{MNO}, \href{https://www.whocc.no/atc_ddd_index/?code=J01AA08&showdescription=no}{J01AA08}), miocamycin (\code{MCM}, \href{https://www.whocc.no/atc_ddd_index/?code=J01FA11&showdescription=no}{J01FA11}), moxifloxacin (\code{MFX}, \href{https://www.whocc.no/atc_ddd_index/?code=J01MA14&showdescription=no}{J01MA14}), nalidixic acid (\code{NAL}, \href{https://www.whocc.no/atc_ddd_index/?code=J01MB02&showdescription=no}{J01MB02}), neomycin (\code{NEO}, \href{https://www.whocc.no/atc_ddd_index/?code=J01GB05&showdescription=no}{J01GB05}), netilmicin (\code{NET}, \href{https://www.whocc.no/atc_ddd_index/?code=J01GB07&showdescription=no}{J01GB07}), nitrofurantoin (\code{NIT}, \href{https://www.whocc.no/atc_ddd_index/?code=J01XE01&showdescription=no}{J01XE01}), norfloxacin (\code{NOR}, \href{https://www.whocc.no/atc_ddd_index/?code=J01MA06&showdescription=no}{J01MA06}), norvancomycin (\code{NVA}, no ATC code), novobiocin (\code{NOV}, \href{https://www.whocc.no/atc_ddd_index/?code=QJ01XX95&showdescription=no}{QJ01XX95}), ofloxacin (\code{OFX}, \href{https://www.whocc.no/atc_ddd_index/?code=J01MA01&showdescription=no}{J01MA01}), oleandomycin (\code{OLE}, \href{https://www.whocc.no/atc_ddd_index/?code=J01FA05&showdescription=no}{J01FA05}), oritavancin (\code{ORI}, \href{https://www.whocc.no/atc_ddd_index/?code=J01XA05&showdescription=no}{J01XA05}), oxacillin (\code{OXA}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CF04&showdescription=no}{J01CF04}), pazufloxacin (\code{PAZ}, \href{https://www.whocc.no/atc_ddd_index/?code=J01MA18&showdescription=no}{J01MA18}), pefloxacin (\code{PEF}, \href{https://www.whocc.no/atc_ddd_index/?code=J01MA03&showdescription=no}{J01MA03}), phenoxymethylpenicillin (\code{PHN}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CE02&showdescription=no}{J01CE02}), piperacillin (\code{PIP}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CA12&showdescription=no}{J01CA12}), piperacillin/tazobactam (\code{TZP}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CR05&showdescription=no}{J01CR05}), pirlimycin (\code{PRL}, no ATC code), pivampicillin (\code{PVM}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CA02&showdescription=no}{J01CA02}), pivmecillinam (\code{PME}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CA08&showdescription=no}{J01CA08}), polymyxin B (\code{PLB}, \href{https://www.whocc.no/atc_ddd_index/?code=J01XB02&showdescription=no}{J01XB02}), pristinamycin (\code{PRI}, \href{https://www.whocc.no/atc_ddd_index/?code=J01FG01&showdescription=no}{J01FG01}), prulifloxacin (\code{PRU}, \href{https://www.whocc.no/atc_ddd_index/?code=J01MA17&showdescription=no}{J01MA17}), quinupristin/dalfopristin (\code{QDA}, \href{https://www.whocc.no/atc_ddd_index/?code=J01FG02&showdescription=no}{J01FG02}), ramoplanin (\code{RAM}, no ATC code), ribostamycin (\code{RST}, \href{https://www.whocc.no/atc_ddd_index/?code=J01GB10&showdescription=no}{J01GB10}), rifampicin (\code{RIF}, \href{https://www.whocc.no/atc_ddd_index/?code=J04AB02&showdescription=no}{J04AB02}), rokitamycin (\code{ROK}, \href{https://www.whocc.no/atc_ddd_index/?code=J01FA12&showdescription=no}{J01FA12}), roxithromycin (\code{RXT}, \href{https://www.whocc.no/atc_ddd_index/?code=J01FA06&showdescription=no}{J01FA06}), rufloxacin (\code{RFL}, \href{https://www.whocc.no/atc_ddd_index/?code=J01MA10&showdescription=no}{J01MA10}), sisomicin (\code{SIS}, \href{https://www.whocc.no/atc_ddd_index/?code=J01GB08&showdescription=no}{J01GB08}), sparfloxacin (\code{SPX}, \href{https://www.whocc.no/atc_ddd_index/?code=J01MA09&showdescription=no}{J01MA09}), spiramycin (\code{SPI}, \href{https://www.whocc.no/atc_ddd_index/?code=J01FA02&showdescription=no}{J01FA02}), streptoduocin (\code{STR}, \href{https://www.whocc.no/atc_ddd_index/?code=J01GA02&showdescription=no}{J01GA02}), streptomycin (\code{STR1}, \href{https://www.whocc.no/atc_ddd_index/?code=J01GA01&showdescription=no}{J01GA01}), sulbenicillin (\code{SBC}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CA16&showdescription=no}{J01CA16}), sulfadiazine (\code{SDI}, \href{https://www.whocc.no/atc_ddd_index/?code=J01EC02&showdescription=no}{J01EC02}), sulfadiazine/trimethoprim (\code{SLT1}, \href{https://www.whocc.no/atc_ddd_index/?code=J01EE02&showdescription=no}{J01EE02}), sulfadimethoxine (\code{SUD}, \href{https://www.whocc.no/atc_ddd_index/?code=J01ED01&showdescription=no}{J01ED01}), sulfadimidine (\code{SDM}, \href{https://www.whocc.no/atc_ddd_index/?code=J01EB03&showdescription=no}{J01EB03}), sulfadimidine/trimethoprim (\code{SLT2}, \href{https://www.whocc.no/atc_ddd_index/?code=J01EE05&showdescription=no}{J01EE05}), sulfafurazole (\code{SLF}, \href{https://www.whocc.no/atc_ddd_index/?code=J01EB05&showdescription=no}{J01EB05}), sulfaisodimidine (\code{SLF1}, \href{https://www.whocc.no/atc_ddd_index/?code=J01EB01&showdescription=no}{J01EB01}), sulfalene (\code{SLF2}, \href{https://www.whocc.no/atc_ddd_index/?code=J01ED02&showdescription=no}{J01ED02}), sulfamazone (\code{SZO}, \href{https://www.whocc.no/atc_ddd_index/?code=J01ED09&showdescription=no}{J01ED09}), sulfamerazine (\code{SLF3}, \href{https://www.whocc.no/atc_ddd_index/?code=J01ED07&showdescription=no}{J01ED07}), sulfamerazine/trimethoprim (\code{SLT3}, \href{https://www.whocc.no/atc_ddd_index/?code=J01EE07&showdescription=no}{J01EE07}), sulfamethizole (\code{SLF4}, \href{https://www.whocc.no/atc_ddd_index/?code=J01EB02&showdescription=no}{J01EB02}), sulfamethoxazole (\code{SMX}, \href{https://www.whocc.no/atc_ddd_index/?code=J01EC01&showdescription=no}{J01EC01}), sulfamethoxypyridazine (\code{SLF5}, \href{https://www.whocc.no/atc_ddd_index/?code=J01ED05&showdescription=no}{J01ED05}), sulfametomidine (\code{SLF6}, \href{https://www.whocc.no/atc_ddd_index/?code=J01ED03&showdescription=no}{J01ED03}), sulfametoxydiazine (\code{SLF7}, \href{https://www.whocc.no/atc_ddd_index/?code=J01ED04&showdescription=no}{J01ED04}), sulfametrole/trimethoprim (\code{SLT4}, \href{https://www.whocc.no/atc_ddd_index/?code=J01EE03&showdescription=no}{J01EE03}), sulfamoxole (\code{SLF8}, \href{https://www.whocc.no/atc_ddd_index/?code=J01EC03&showdescription=no}{J01EC03}), sulfamoxole/trimethoprim (\code{SLT5}, \href{https://www.whocc.no/atc_ddd_index/?code=J01EE04&showdescription=no}{J01EE04}), sulfanilamide (\code{SLF9}, \href{https://www.whocc.no/atc_ddd_index/?code=J01EB06&showdescription=no}{J01EB06}), sulfaperin (\code{SLF10}, \href{https://www.whocc.no/atc_ddd_index/?code=J01ED06&showdescription=no}{J01ED06}), sulfaphenazole (\code{SLF11}, \href{https://www.whocc.no/atc_ddd_index/?code=J01ED08&showdescription=no}{J01ED08}), sulfapyridine (\code{SLF12}, \href{https://www.whocc.no/atc_ddd_index/?code=J01EB04&showdescription=no}{J01EB04}), sulfathiazole (\code{SUT}, \href{https://www.whocc.no/atc_ddd_index/?code=J01EB07&showdescription=no}{J01EB07}), sulfathiourea (\code{SLF13}, \href{https://www.whocc.no/atc_ddd_index/?code=J01EB08&showdescription=no}{J01EB08}), talampicillin (\code{TAL}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CA15&showdescription=no}{J01CA15}), tedizolid (\code{TZD}, \href{https://www.whocc.no/atc_ddd_index/?code=J01XX11&showdescription=no}{J01XX11}), teicoplanin (\code{TEC}, \href{https://www.whocc.no/atc_ddd_index/?code=J01XA02&showdescription=no}{J01XA02}), teicoplanin-macromethod (\code{TCM}, no ATC code), telavancin (\code{TLV}, \href{https://www.whocc.no/atc_ddd_index/?code=J01XA03&showdescription=no}{J01XA03}), telithromycin (\code{TLT}, \href{https://www.whocc.no/atc_ddd_index/?code=J01FA15&showdescription=no}{J01FA15}), temafloxacin (\code{TMX}, \href{https://www.whocc.no/atc_ddd_index/?code=J01MA05&showdescription=no}{J01MA05}), temocillin (\code{TEM}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CA17&showdescription=no}{J01CA17}), tetracycline (\code{TCY}, \href{https://www.whocc.no/atc_ddd_index/?code=J01AA07&showdescription=no}{J01AA07}), thiacetazone (\code{THA}, no ATC code), ticarcillin (\code{TIC}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CA13&showdescription=no}{J01CA13}), ticarcillin/clavulanic acid (\code{TCC}, \href{https://www.whocc.no/atc_ddd_index/?code=J01CR03&showdescription=no}{J01CR03}), tigecycline (\code{TGC}, \href{https://www.whocc.no/atc_ddd_index/?code=J01AA12&showdescription=no}{J01AA12}), tobramycin (\code{TOB}, \href{https://www.whocc.no/atc_ddd_index/?code=J01GB01&showdescription=no}{J01GB01}), trimethoprim (\code{TMP}, \href{https://www.whocc.no/atc_ddd_index/?code=J01EA01&showdescription=no}{J01EA01}), trimethoprim/sulfamethoxazole (\code{SXT}, \href{https://www.whocc.no/atc_ddd_index/?code=J01EE01&showdescription=no}{J01EE01}), troleandomycin (\code{TRL}, \href{https://www.whocc.no/atc_ddd_index/?code=J01FA08&showdescription=no}{J01FA08}), trovafloxacin (\code{TVA}, \href{https://www.whocc.no/atc_ddd_index/?code=J01MA13&showdescription=no}{J01MA13}), vancomycin (\code{VAN}, \href{https://www.whocc.no/atc_ddd_index/?code=J01XA01&showdescription=no}{J01XA01}) } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -97,12 +97,12 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } -\section{Reference data publicly available}{ +\section{Reference Data Publicly Available}{ All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{AMR} package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/example_isolates.Rd b/man/example_isolates.Rd index 9d89120e..45f68b6c 100644 --- a/man/example_isolates.Rd +++ b/man/example_isolates.Rd @@ -3,7 +3,7 @@ \docType{data} \name{example_isolates} \alias{example_isolates} -\title{Data set with 2,000 example isolates} +\title{Data Set with 2,000 Example Isolates} \format{ A \link{data.frame} with 2,000 observations and 49 variables: \itemize{ @@ -25,12 +25,12 @@ example_isolates \description{ A data set containing 2,000 microbial isolates with their full antibiograms. The data set reflects reality and can be used to practice AMR analysis. For examples, please read \href{https://msberends.github.io/AMR/articles/AMR.html}{the tutorial on our website}. } -\section{Reference data publicly available}{ +\section{Reference Data Publicly Available}{ All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{AMR} package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/example_isolates_unclean.Rd b/man/example_isolates_unclean.Rd index e071349f..66de560a 100644 --- a/man/example_isolates_unclean.Rd +++ b/man/example_isolates_unclean.Rd @@ -3,7 +3,7 @@ \docType{data} \name{example_isolates_unclean} \alias{example_isolates_unclean} -\title{Data set with unclean data} +\title{Data Set with Unclean Data} \format{ A \link{data.frame} with 3,000 observations and 8 variables: \itemize{ @@ -20,12 +20,12 @@ example_isolates_unclean \description{ A data set containing 3,000 microbial isolates that are not cleaned up and consequently not ready for AMR analysis. This data set can be used for practice. } -\section{Reference data publicly available}{ +\section{Reference Data Publicly Available}{ All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{AMR} package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/filter_ab_class.Rd b/man/filter_ab_class.Rd index 1604a241..48d4b151 100644 --- a/man/filter_ab_class.Rd +++ b/man/filter_ab_class.Rd @@ -15,7 +15,7 @@ \alias{filter_macrolides} \alias{filter_penicillins} \alias{filter_tetracyclines} -\title{Filter isolates on result in antimicrobial class} +\title{Filter Isolates on Result in Antimicrobial Class} \usage{ filter_ab_class(x, ab_class, result = NULL, scope = "any", ...) @@ -62,7 +62,7 @@ Filter isolates on results in specific antimicrobial classes. This makes it easy \details{ All columns of \code{x} will be searched for known antibiotic names, abbreviations, brand names and codes (ATC, EARS-Net, WHO, etc.). This means that a filter function like e.g. \code{\link[=filter_aminoglycosides]{filter_aminoglycosides()}} will include column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc. } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. diff --git a/man/first_isolate.Rd b/man/first_isolate.Rd index 730fd4f6..48dbe7d3 100755 --- a/man/first_isolate.Rd +++ b/man/first_isolate.Rd @@ -4,7 +4,7 @@ \alias{first_isolate} \alias{filter_first_isolate} \alias{filter_first_weighted_isolate} -\title{Determine first (weighted) isolates} +\title{Determine First (Weighted) Isolates} \source{ Methodology of this function is strictly based on: @@ -64,9 +64,9 @@ filter_first_weighted_isolate( \item{col_icu}{column name of the logicals (\code{TRUE}/\code{FALSE}) whether a ward or department is an Intensive Care Unit (ICU)} -\item{col_keyantibiotics}{column name of the key antibiotics to determine first \emph{weighted} isolates, see \code{\link[=key_antibiotics]{key_antibiotics()}}. Defaults to the first column that starts with 'key' followed by 'ab' or 'antibiotics' (case insensitive). Use \code{col_keyantibiotics = FALSE} to prevent this.} +\item{col_keyantibiotics}{column name of the key antibiotics to determine first (weighted) isolates, see \code{\link[=key_antibiotics]{key_antibiotics()}}. Defaults to the first column that starts with 'key' followed by 'ab' or 'antibiotics' (case insensitive). Use \code{col_keyantibiotics = FALSE} to prevent this.} -\item{episode_days}{episode in days after which a genus/species combination will be determined as 'first isolate' again. The default of 365 days is based on the guideline by CLSI, see Source.} +\item{episode_days}{episode in days after which a genus/species combination will be determined as 'first isolate' again. The default of 365 days is based on the guideline by CLSI, see \emph{Source}.} \item{testcodes_exclude}{character vector with test codes that should be excluded (case-insensitive)} @@ -74,11 +74,11 @@ filter_first_weighted_isolate( \item{specimen_group}{value in the column set with \code{col_specimen} to filter on} -\item{type}{type to determine weighed isolates; can be \code{"keyantibiotics"} or \code{"points"}, see Details} +\item{type}{type to determine weighed isolates; can be \code{"keyantibiotics"} or \code{"points"}, see \emph{Details}} -\item{ignore_I}{logical to determine whether antibiotic interpretations with \code{"I"} will be ignored when \code{type = "keyantibiotics"}, see Details} +\item{ignore_I}{logical to determine whether antibiotic interpretations with \code{"I"} will be ignored when \code{type = "keyantibiotics"}, see \emph{Details}} -\item{points_threshold}{points until the comparison of key antibiotics will lead to inclusion of an isolate when \code{type = "points"}, see Details} +\item{points_threshold}{points until the comparison of key antibiotics will lead to inclusion of an isolate when \code{type = "points"}, see \emph{Details}} \item{info}{print progress} @@ -93,17 +93,17 @@ A \code{\link{logical}} vector Determine first (weighted) isolates of all microorganisms of every patient per episode and (if needed) per specimen type. To determine patient episodes not necessarily based on microorganisms, use \code{\link[=is_new_episode]{is_new_episode()}} that also supports grouping with the \code{dplyr} package. } \details{ -These functions are context-aware when used inside \code{dplyr} verbs, such as \code{filter()}, \code{mutate()} and \code{summarise()}. This means that then the \code{x} argument can be left blank, please see \emph{Examples}. +These functions are context-aware when used inside \code{dplyr} verbs, such as \code{filter()}, \code{mutate()} and \code{summarise()}. This means that then the \code{x} argument can be left blank, see \emph{Examples}. The \code{\link[=first_isolate]{first_isolate()}} function is a wrapper around the \code{\link[=is_new_episode]{is_new_episode()}} function, but more efficient for data sets containing microorganism codes or names. All isolates with a microbial ID of \code{NA} will be excluded as first isolate. -\subsection{Why this is so important}{ +\subsection{Why this is so Important}{ To conduct an analysis of antimicrobial resistance, you should only include the first isolate of every patient per episode \href{https://pubmed.ncbi.nlm.nih.gov/17304462/}{(Hindler \emph{et al.} 2007)}. If you would not do this, you could easily get an overestimate or underestimate of the resistance of an antibiotic. Imagine that a patient was admitted with an MRSA and that it was found in 5 different blood cultures the following week. The resistance percentage of oxacillin of all \emph{S. aureus} isolates would be overestimated, because you included this MRSA more than once. It would be \href{https://en.wikipedia.org/wiki/Selection_bias}{selection bias}. } -\subsection{\verb{filter_*()} shortcuts}{ +\subsection{\verb{filter_*()} Shortcuts}{ The functions \code{\link[=filter_first_isolate]{filter_first_isolate()}} and \code{\link[=filter_first_weighted_isolate]{filter_first_weighted_isolate()}} are helper functions to quickly filter on first isolates. @@ -121,9 +121,9 @@ The function \code{\link[=filter_first_weighted_isolate]{filter_first_weighted_i } } } -\section{Key antibiotics}{ +\section{Key Antibiotics}{ -There are two ways to determine whether isolates can be included as first \emph{weighted} isolates which will give generally the same results: +There are two ways to determine whether isolates can be included as first weighted isolates which will give generally the same results: \enumerate{ \item Using \code{type = "keyantibiotics"} and argument \code{ignore_I} @@ -134,7 +134,7 @@ A difference from I to S|R (or vice versa) means 0.5 points, a difference from S } } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -142,7 +142,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/g.test.Rd b/man/g.test.Rd index 7d583f89..648ac9ae 100644 --- a/man/g.test.Rd +++ b/man/g.test.Rd @@ -61,7 +61,7 @@ The p-value is computed from the asymptotic chi-squared distribution of the test In the contingency table case simulation is done by random sampling from the set of all contingency tables with given marginals, and works only if the marginals are strictly positive. Note that this is not the usual sampling situation assumed for a chi-squared test (such as the \emph{G}-test) but rather that for Fisher's exact test. In the goodness-of-fit case simulation is done by random sampling from the discrete distribution specified by \code{p}, each sample being of size \code{n = sum(x)}. This simulation is done in \R and may be slow. -\subsection{\emph{G}-test of goodness-of-fit (likelihood ratio test)}{ +\subsection{\emph{G}-test Of Goodness-of-Fit (Likelihood Ratio Test)}{ Use the \emph{G}-test of goodness-of-fit when you have one nominal variable with two or more values (such as male and female, or red, pink and white flowers). You compare the observed counts of numbers of observations in each category with the expected counts, which you calculate using some kind of theoretical expectation (such as a 1:1 sex ratio or a 1:2:1 ratio in a genetic cross). @@ -70,7 +70,7 @@ If the expected number of observations in any category is too small, the \emph{G The \emph{G}-test of goodness-of-fit is an alternative to the chi-square test of goodness-of-fit (\code{\link[=chisq.test]{chisq.test()}}); each of these tests has some advantages and some disadvantages, and the results of the two tests are usually very similar. } -\subsection{\emph{G}-test of independence}{ +\subsection{\emph{G}-test of Independence}{ Use the \emph{G}-test of independence when you have two nominal variables, each with two or more possible values. You want to know whether the proportions for one variable are different among values of the other variable. @@ -81,7 +81,7 @@ Fisher's exact test (\code{\link[=fisher.test]{fisher.test()}}) is an \strong{ex The \emph{G}-test of independence is an alternative to the chi-square test of independence (\code{\link[=chisq.test]{chisq.test()}}), and they will give approximately the same results. } -\subsection{How the test works}{ +\subsection{How the Test Works}{ Unlike the exact test of goodness-of-fit (\code{\link[=fisher.test]{fisher.test()}}), the \emph{G}-test does not directly calculate the probability of obtaining the observed results or something more extreme. Instead, like almost all statistical tests, the \emph{G}-test has an intermediate step; it uses the data to calculate a test statistic that measures how far the observed data are from the null expectation. You then use a mathematical relationship, in this case the chi-square distribution, to estimate the probability of obtaining that value of the test statistic. @@ -97,13 +97,13 @@ where \code{df} are the degrees of freedom. If there are more than two categories and you want to find out which ones are significantly different from their null expectation, you can use the same method of testing each category vs. the sum of all categories, with the Bonferroni correction. You use \emph{G}-tests for each category, of course. } } -\section{Questioning lifecycle}{ +\section{Questioning Lifecycle}{ \if{html}{\figure{lifecycle_questioning.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{questioning}. This function might be no longer be optimal approach, or is it questionable whether this function should be in this \code{AMR} package at all. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/get_episode.Rd b/man/get_episode.Rd index ecab0ae6..43ee3fa3 100644 --- a/man/get_episode.Rd +++ b/man/get_episode.Rd @@ -3,7 +3,7 @@ \name{get_episode} \alias{get_episode} \alias{is_new_episode} -\title{Determine (new) episodes for patients} +\title{Determine (New) Episodes for Patients} \usage{ get_episode(x, episode_days, ...) @@ -12,7 +12,7 @@ is_new_episode(x, episode_days, ...) \arguments{ \item{x}{vector of dates (class \code{Date} or \code{POSIXt})} -\item{episode_days}{length of the required episode in days, please see \emph{Details}} +\item{episode_days}{length of the required episode in days, see \emph{Details}} \item{...}{arguments passed on to \code{\link[=as.Date]{as.Date()}}} } @@ -32,7 +32,7 @@ The \code{\link[=first_isolate]{first_isolate()}} function is a wrapper around t The \code{dplyr} package is not required for these functions to work, but these functions support \link[dplyr:group_by]{variable grouping} and work conveniently inside \code{dplyr} verbs such as \code{\link[dplyr:filter]{filter()}}, \code{\link[dplyr:mutate]{mutate()}} and \code{\link[dplyr:summarise]{summarise()}}. } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -40,7 +40,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/ggplot_pca.Rd b/man/ggplot_pca.Rd index b3dc4773..e918c4f8 100644 --- a/man/ggplot_pca.Rd +++ b/man/ggplot_pca.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/ggplot_pca.R \name{ggplot_pca} \alias{ggplot_pca} -\title{PCA biplot with \code{ggplot2}} +\title{PCA Biplot with \code{ggplot2}} \source{ The \code{\link[=ggplot_pca]{ggplot_pca()}} function is based on the \code{ggbiplot()} function from the \code{ggbiplot} package by Vince Vu, as found on GitHub: \url{https://github.com/vqv/ggbiplot} (retrieved: 2 March 2020, their latest commit: \href{https://github.com/vqv/ggbiplot/commit/7325e880485bea4c07465a0304c470608fffb5d9}{\code{7325e88}}; 12 February 2015). @@ -108,7 +108,7 @@ Produces a \code{ggplot2} variant of a so-called \href{https://en.wikipedia.org/ \details{ The colours for labels and points can be changed by adding another scale layer for colour, like \code{scale_colour_viridis_d()} or \code{scale_colour_brewer()}. } -\section{Maturing lifecycle}{ +\section{Maturing Lifecycle}{ \if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. Since this function needs wider usage and more extensive testing, you are very welcome \href{https://github.com/msberends/AMR/issues}{to suggest changes at our repository} or \link[=AMR]{write us an email (see section 'Contact Us')}. diff --git a/man/ggplot_rsi.Rd b/man/ggplot_rsi.Rd index 4e1023a1..1869936b 100644 --- a/man/ggplot_rsi.Rd +++ b/man/ggplot_rsi.Rd @@ -8,7 +8,7 @@ \alias{scale_rsi_colours} \alias{theme_rsi} \alias{labels_rsi_count} -\title{AMR plots with \code{ggplot2}} +\title{AMR Plots with \code{ggplot2}} \usage{ ggplot_rsi( data, @@ -93,7 +93,7 @@ labels_rsi_count( \item{combine_IR}{a logical to indicate whether all values of I and R must be merged into one, so the output only consists of S vs. I+R (susceptible vs. non-susceptible). This is outdated, see argument \code{combine_SI}.} -\item{minimum}{the minimum allowed number of available (tested) isolates. Any isolate count lower than \code{minimum} will return \code{NA} with a warning. The default number of \code{30} isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see Source.} +\item{minimum}{the minimum allowed number of available (tested) isolates. Any isolate count lower than \code{minimum} will return \code{NA} with a warning. The default number of \code{30} isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see \emph{Source}.} \item{language}{language of the returned text, defaults to system language (see \code{\link[=get_locale]{get_locale()}}) and can also be set with \code{getOption("AMR_locale")}. Use \code{language = NULL} or \code{language = ""} to prevent translation.} @@ -124,7 +124,7 @@ Use these functions to create bar plots for antimicrobial resistance analysis. A } \details{ At default, the names of antibiotics will be shown on the plots using \code{\link[=ab_name]{ab_name()}}. This can be set with the \code{translate_ab} argument. See \code{\link[=count_df]{count_df()}}. -\subsection{The functions}{ +\subsection{The Functions}{ \code{\link[=geom_rsi]{geom_rsi()}} will take any variable from the data that has an \code{\link{rsi}} class (created with \code{\link[=as.rsi]{as.rsi()}}) using \code{\link[=rsi_df]{rsi_df()}} and will plot bars with the percentage R, I and S. The default behaviour is to have the bars stacked and to have the different antibiotics on the x axis. @@ -138,16 +138,16 @@ At default, the names of antibiotics will be shown on the plots using \code{\lin \code{\link[=labels_rsi_count]{labels_rsi_count()}} print datalabels on the bars with percentage and amount of isolates using \code{\link[ggplot2:geom_text]{ggplot2::geom_text()}}. -\code{\link[=ggplot_rsi]{ggplot_rsi()}} is a wrapper around all above functions that uses data as first input. This makes it possible to use this function after a pipe (\verb{\%>\%}). See Examples. +\code{\link[=ggplot_rsi]{ggplot_rsi()}} is a wrapper around all above functions that uses data as first input. This makes it possible to use this function after a pipe (\verb{\%>\%}). See \emph{Examples}. } } -\section{Maturing lifecycle}{ +\section{Maturing Lifecycle}{ \if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. Since this function needs wider usage and more extensive testing, you are very welcome \href{https://github.com/msberends/AMR/issues}{to suggest changes at our repository} or \link[=AMR]{write us an email (see section 'Contact Us')}. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/guess_ab_col.Rd b/man/guess_ab_col.Rd index 9e0c606b..26c5dcb8 100644 --- a/man/guess_ab_col.Rd +++ b/man/guess_ab_col.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/guess_ab_col.R \name{guess_ab_col} \alias{guess_ab_col} -\title{Guess antibiotic column} +\title{Guess Antibiotic Column} \usage{ guess_ab_col(x = NULL, search_string = NULL, verbose = FALSE) } @@ -22,7 +22,7 @@ This tries to find a column name in a data set based on information from the \li \details{ You can look for an antibiotic (trade) name or abbreviation and it will search \code{x} and the \link{antibiotics} data set for any column containing a name or code of that antibiotic. \strong{Longer columns names take precedence over shorter column names.} } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -30,7 +30,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/intrinsic_resistant.Rd b/man/intrinsic_resistant.Rd index f0a9673a..4569dd5c 100644 --- a/man/intrinsic_resistant.Rd +++ b/man/intrinsic_resistant.Rd @@ -3,7 +3,7 @@ \docType{data} \name{intrinsic_resistant} \alias{intrinsic_resistant} -\title{Data set with bacterial intrinsic resistance} +\title{Data Set with Bacterial Intrinsic Resistance} \format{ A \link{data.frame} with 93,892 observations and 2 variables: \itemize{ @@ -22,12 +22,12 @@ The repository of this \code{AMR} package contains a file comprising this exact This data set 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). } -\section{Reference data publicly available}{ +\section{Reference Data Publicly Available}{ All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{AMR} package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/isolate_identifier.Rd b/man/isolate_identifier.Rd index 60c541eb..c6d2c3e7 100644 --- a/man/isolate_identifier.Rd +++ b/man/isolate_identifier.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/isolate_identifier.R \name{isolate_identifier} \alias{isolate_identifier} -\title{Create identifier of an isolate} +\title{Create Identifier of an Isolate} \usage{ isolate_identifier(x, col_mo = NULL, cols_ab = NULL) } @@ -16,13 +16,13 @@ isolate_identifier(x, col_mo = NULL, cols_ab = NULL) \description{ This function will paste the microorganism code with all antimicrobial results into one string for each row in a data set. This is useful to compare isolates, e.g. between institutions or regions, when there is no genotyping available. } -\section{Maturing lifecycle}{ +\section{Maturing Lifecycle}{ \if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. Since this function needs wider usage and more extensive testing, you are very welcome \href{https://github.com/msberends/AMR/issues}{to suggest changes at our repository} or \link[=AMR]{write us an email (see section 'Contact Us')}. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/join.Rd b/man/join.Rd index a938f872..871e3b4f 100755 --- a/man/join.Rd +++ b/man/join.Rd @@ -9,7 +9,7 @@ \alias{full_join_microorganisms} \alias{semi_join_microorganisms} \alias{anti_join_microorganisms} -\title{Join \link{microorganisms} to a data set} +\title{Join \link{microorganisms} to a Data Set} \usage{ inner_join_microorganisms(x, by = NULL, suffix = c("2", ""), ...) @@ -40,7 +40,7 @@ Join the data set \link{microorganisms} easily to an existing table or character If the \code{dplyr} package is installed, their join functions will be used. Otherwise, the much slower \code{\link[=merge]{merge()}} function from base R will be used. } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -48,7 +48,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/key_antibiotics.Rd b/man/key_antibiotics.Rd index 4ada8def..0ea4348b 100755 --- a/man/key_antibiotics.Rd +++ b/man/key_antibiotics.Rd @@ -3,7 +3,7 @@ \name{key_antibiotics} \alias{key_antibiotics} \alias{key_antibiotics_equal} -\title{Key antibiotics for first \emph{weighted} isolates} +\title{Key Antibiotics for First (Weighted) Isolates} \usage{ key_antibiotics( x, @@ -56,19 +56,19 @@ key_antibiotics_equal( \item{y, z}{character vectors to compare} -\item{type}{type to determine weighed isolates; can be \code{"keyantibiotics"} or \code{"points"}, see Details} +\item{type}{type to determine weighed isolates; can be \code{"keyantibiotics"} or \code{"points"}, see \emph{Details}} -\item{ignore_I}{logical to determine whether antibiotic interpretations with \code{"I"} will be ignored when \code{type = "keyantibiotics"}, see Details} +\item{ignore_I}{logical to determine whether antibiotic interpretations with \code{"I"} will be ignored when \code{type = "keyantibiotics"}, see \emph{Details}} -\item{points_threshold}{points until the comparison of key antibiotics will lead to inclusion of an isolate when \code{type = "points"}, see Details} +\item{points_threshold}{points until the comparison of key antibiotics will lead to inclusion of an isolate when \code{type = "points"}, see \emph{Details}} \item{info}{print progress} } \description{ -These function can be used to determine first isolates (see \code{\link[=first_isolate]{first_isolate()}}). Using key antibiotics to determine first isolates is more reliable than without key antibiotics. These selected isolates can then be called first \emph{weighted} isolates. +These function can be used to determine first isolates (see \code{\link[=first_isolate]{first_isolate()}}). Using key antibiotics to determine first isolates is more reliable than without key antibiotics. These selected isolates can then be called first 'weighted' isolates. } \details{ -The \code{\link[=key_antibiotics]{key_antibiotics()}} function is context-aware when used inside \code{dplyr} verbs, such as \code{filter()}, \code{mutate()} and \code{summarise()}. This means that then the \code{x} argument can be left blank, please see \emph{Examples}. +The \code{\link[=key_antibiotics]{key_antibiotics()}} function is context-aware when used inside \code{dplyr} verbs, such as \code{filter()}, \code{mutate()} and \code{summarise()}. This means that then the \code{x} argument can be left blank, see \emph{Examples}. The function \code{\link[=key_antibiotics]{key_antibiotics()}} returns a character vector with 12 antibiotic results for every isolate. These isolates can then be compared using \code{\link[=key_antibiotics_equal]{key_antibiotics_equal()}}, to check if two isolates have generally the same antibiogram. Missing and invalid values are replaced with a dot (\code{"."}) by \code{\link[=key_antibiotics]{key_antibiotics()}} and ignored by \code{\link[=key_antibiotics_equal]{key_antibiotics_equal()}}. @@ -108,7 +108,7 @@ At default the antibiotics that are used for \strong{Gram-negative bacteria} are The function \code{\link[=key_antibiotics_equal]{key_antibiotics_equal()}} checks the characters returned by \code{\link[=key_antibiotics]{key_antibiotics()}} for equality, and returns a \code{\link{logical}} vector. } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -116,9 +116,9 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } -\section{Key antibiotics}{ +\section{Key Antibiotics}{ -There are two ways to determine whether isolates can be included as first \emph{weighted} isolates which will give generally the same results: +There are two ways to determine whether isolates can be included as first weighted isolates which will give generally the same results: \enumerate{ \item Using \code{type = "keyantibiotics"} and argument \code{ignore_I} @@ -129,7 +129,7 @@ A difference from I to S|R (or vice versa) means 0.5 points, a difference from S } } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/kurtosis.Rd b/man/kurtosis.Rd index 5fe01774..1feeac79 100644 --- a/man/kurtosis.Rd +++ b/man/kurtosis.Rd @@ -5,7 +5,7 @@ \alias{kurtosis.default} \alias{kurtosis.matrix} \alias{kurtosis.data.frame} -\title{Kurtosis of the sample} +\title{Kurtosis of the Sample} \usage{ kurtosis(x, na.rm = FALSE, excess = FALSE) @@ -25,7 +25,7 @@ kurtosis(x, na.rm = FALSE, excess = FALSE) \description{ Kurtosis is a measure of the "tailedness" of the probability distribution of a real-valued random variable. A normal distribution has a kurtosis of 3 and a excess kurtosis of 0. } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -33,7 +33,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/lifecycle.Rd b/man/lifecycle.Rd index 32dfaeac..c14bffc5 100644 --- a/man/lifecycle.Rd +++ b/man/lifecycle.Rd @@ -2,26 +2,26 @@ % Please edit documentation in R/lifecycle.R \name{lifecycle} \alias{lifecycle} -\title{Lifecycles of functions in the \code{AMR} package} +\title{Lifecycles of Functions in the \code{amr} Package} \description{ Functions in this \code{AMR} package are categorised using \href{https://www.Tidyverse.org/lifecycle}{the lifecycle circle of the Tidyverse as found on www.tidyverse.org/lifecycle}. \if{html}{\figure{lifecycle_tidyverse.svg}{options: height=200px style=margin-bottom:5px} \cr} This page contains a section for every lifecycle (with text borrowed from the aforementioned Tidyverse website), so they can be used in the manual pages of the functions. } -\section{Experimental lifecycle}{ +\section{Experimental Lifecycle}{ \if{html}{\figure{lifecycle_experimental.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{experimental}. An experimental function is in early stages of development. The unlying code might be changing frequently. Experimental functions might be removed without deprecation, so you are generally best off waiting until a function is more mature before you use it in production code. Experimental functions are only available in development versions of this \code{AMR} package and will thus not be included in releases that are submitted to CRAN, since such functions have not yet matured enough. } -\section{Maturing lifecycle}{ +\section{Maturing Lifecycle}{ \if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. Since this function needs wider usage and more extensive testing, you are very welcome \href{https://github.com/msberends/AMR/issues}{to suggest changes at our repository} or \link[=AMR]{write us an email (see section 'Contact Us')}. } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -29,13 +29,13 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } -\section{Retired lifecycle}{ +\section{Retired Lifecycle}{ \if{html}{\figure{lifecycle_retired.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{retired}. A retired function is no longer under active development, and (if appropiate) a better alternative is available. No new arguments will be added, and only the most critical bugs will be fixed. In a future version, this function will be removed. } -\section{Questioning lifecycle}{ +\section{Questioning Lifecycle}{ \if{html}{\figure{lifecycle_questioning.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{questioning}. This function might be no longer be optimal approach, or is it questionable whether this function should be in this \code{AMR} package at all. diff --git a/man/like.Rd b/man/like.Rd index 06916cdb..269fdfa9 100755 --- a/man/like.Rd +++ b/man/like.Rd @@ -4,7 +4,7 @@ \alias{like} \alias{\%like\%} \alias{\%like_case\%} -\title{Pattern matching with keyboard shortcut} +\title{Pattern Matching with Keyboard Shortcut} \source{ Idea from the \href{https://github.com/Rdatatable/data.table/blob/master/R/like.R}{\code{like} function from the \code{data.table} package} } @@ -39,7 +39,7 @@ The \verb{\%like\%} function: Using RStudio? The text \verb{\%like\%} can also be directly inserted in your code from the Addins menu and can have its own Keyboard Shortcut like \code{Ctrl+Shift+L} or \code{Cmd+Shift+L} (see \code{Tools} > \verb{Modify Keyboard Shortcuts...}). } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -47,7 +47,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/mdro.Rd b/man/mdro.Rd index 096759aa..97b1f01e 100644 --- a/man/mdro.Rd +++ b/man/mdro.Rd @@ -14,9 +14,9 @@ \alias{mdr_tb} \alias{mdr_cmi2012} \alias{eucast_exceptional_phenotypes} -\title{Determine multidrug-resistant organisms (MDRO)} +\title{Determine Multidrug-Resistant Organisms (MDRO)} \source{ -Please see \emph{Details} for the list of publications used for this function. +See the supported guidelines above for the list of publications used for this function. } \usage{ mdro( @@ -30,7 +30,7 @@ mdro( ... ) -custom_mdro_guideline(...) +custom_mdro_guideline(..., as_factor = TRUE) brmo(x, guideline = "BRMO", ...) @@ -45,7 +45,7 @@ eucast_exceptional_phenotypes(x, guideline = "EUCAST", ...) \arguments{ \item{x}{a \link{data.frame} with antibiotics columns, like \code{AMX} or \code{amox}. Can be left blank for automatic determination.} -\item{guideline}{a specific guideline to follow. Can also have \code{\link[=custom_mdro_guideline]{custom_mdro_guideline()}} as input. When left empty, the publication by Magiorakos \emph{et al.} (2012, Clinical Microbiology and Infection) will be followed, please see \emph{Details}.} +\item{guideline}{a specific guideline to follow, see sections \emph{Supported international / national guidelines} and \emph{Using Custom Guidelines} below. When left empty, the publication by Magiorakos \emph{et al.} (see below) will be followed.} \item{col_mo}{column name of the IDs of the microorganisms (see \code{\link[=as.mo]{as.mo()}}), defaults to the first column of class \code{\link{mo}}. Values will be coerced using \code{\link[=as.mo]{as.mo()}}.} @@ -57,7 +57,9 @@ eucast_exceptional_phenotypes(x, guideline = "EUCAST", ...) \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{...}{column name of an antibiotic, please see section \emph{Antibiotics} below} +\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.} + +\item{as_factor}{a \link{logical} to indicate whether the returned value should be an ordered \link{factor} (\code{TRUE}, default), or otherwise a \link{character} vector} } \value{ \itemize{ @@ -75,12 +77,14 @@ Ordered \link{factor} with levels \code{Negative} < \verb{Positive, unconfirmed} Determine which isolates are multidrug-resistant organisms (MDRO) according to international, national and custom guidelines. } \details{ -These functions are context-aware when used inside \code{dplyr} verbs, such as \code{filter()}, \code{mutate()} and \code{summarise()}. This means that then the \code{x} argument can be left blank, please see \emph{Examples}. +These functions are context-aware when used inside \code{dplyr} verbs, such as \code{filter()}, \code{mutate()} and \code{summarise()}. This means that then the \code{x} argument can be left blank, see \emph{Examples}. For the \code{pct_required_classes} argument, values above 1 will be divided by 100. This is to support both fractions (\code{0.75} or \code{3/4}) and percentages (\code{75}). \strong{Note:} Every test that involves the Enterobacteriaceae family, will internally be performed using its newly named \emph{order} Enterobacterales, since the Enterobacteriaceae family has been taxonomically reclassified by Adeolu \emph{et al.} in 2016. Before that, Enterobacteriaceae was the only family under the Enterobacteriales (with an i) order. All species under the old Enterobacteriaceae family are still under the new Enterobacterales (without an i) order, but divided into multiple families. The way tests are performed now by this \code{\link[=mdro]{mdro()}} function makes sure that results from before 2016 and after 2016 are identical. -\subsection{International / National guidelines}{ +} +\section{Supported International / National Guidelines}{ + Currently supported guidelines are (case-insensitive): \itemize{ @@ -107,33 +111,36 @@ The Dutch national guideline - Rijksinstituut voor Volksgezondheid en Milieu "WI Please suggest your own (country-specific) guidelines by letting us know: \url{https://github.com/msberends/AMR/issues/new}. } -\subsection{Custom guidelines}{ +\section{Using Custom Guidelines}{ + Custom guidelines can be set with the \code{\link[=custom_mdro_guideline]{custom_mdro_guideline()}} function. This is of great importance if you have custom rules to determine MDROs in your hospital, e.g., rules that are dependent on ward, state of contact isolation or other variables in your data. -If you are familiar with \code{case_when()} of the \code{dplyr} package, you will recognise the input method to set your own rules. Rules must be set using what \R considers to be the 'formula notation':\preformatted{custom <- custom_mdro_guideline("CIP == 'R' & age > 60" ~ "Elderly Type A", - "ERY == 'R' & age > 60" ~ "Elderly Type B") +If you are familiar with \code{case_when()} of the \code{dplyr} package, you will recognise the input method to set your own rules. Rules must be set using what \R considers to be the 'formula notation':\preformatted{custom <- custom_mdro_guideline(CIP == "R" & age > 60 ~ "Elderly Type A", + ERY == "R" & age > 60 ~ "Elderly Type B") } If a row/an isolate matches the first rule, the value after the first \code{~} (in this case \emph{'Elderly Type A'}) will be set as MDRO value. Otherwise, the second rule will be tried and so on. The number of rules is unlimited. You can print the rules set in the console for an overview. Colours will help reading it if your console supports colours.\preformatted{custom #> A set of custom MDRO rules: -#> 1. CIP == "R" & age > 60 -> "Elderly Type A" -#> 2. ERY == "R" & age > 60 -> "Elderly Type B" -#> 3. Otherwise -> "Negative" +#> 1. CIP is "R" and age is higher than 60 -> Elderly Type A +#> 2. ERY is "R" and age is higher than 60 -> Elderly Type B +#> 3. Otherwise -> Negative #> #> Unmatched rows will return NA. } The outcome of the function can be used for the \code{guideline} argument in the \code{\link[=mdro]{mdro()}} function:\preformatted{x <- mdro(example_isolates, guideline = custom) table(x) +#> Elderly Type A Elderly Type B Negative +#> 43 891 1066 } The rules set (the \code{custom} object in this case) could be exported to a shared file location using \code{\link[=saveRDS]{saveRDS()}} if you collaborate with multiple users. The custom rules set could then be imported using \code{\link[=readRDS]{readRDS()}}, } -} -\section{Stable lifecycle}{ + +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -165,7 +172,7 @@ A microorganism is categorised as \emph{Susceptible, Increased exposure} when th This AMR package honours this new insight. Use \code{\link[=susceptibility]{susceptibility()}} (equal to \code{\link[=proportion_SI]{proportion_SI()}}) to determine antimicrobial susceptibility and \code{\link[=count_susceptible]{count_susceptible()}} (equal to \code{\link[=count_SI]{count_SI()}}) to count susceptible isolates. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } @@ -174,8 +181,8 @@ On our website \url{https://msberends.github.io/AMR/} you can find \href{https:/ mdro(example_isolates, guideline = "EUCAST") mdro(example_isolates, - guideline = custom_mdro_guideline("AMX == 'R'" ~ "Custom MDRO 1", - "VAN == 'R'" ~ "Custom MDRO 2")) + guideline = custom_mdro_guideline(AMX == "R" ~ "Custom MDRO 1", + VAN == "R" ~ "Custom MDRO 2")) \donttest{ if (require("dplyr")) { diff --git a/man/microorganisms.Rd b/man/microorganisms.Rd index 4f7b2c1c..0fb4d18e 100755 --- a/man/microorganisms.Rd +++ b/man/microorganisms.Rd @@ -3,7 +3,7 @@ \docType{data} \name{microorganisms} \alias{microorganisms} -\title{Data set with 67,151 microorganisms} +\title{Data Set with 67,151 Microorganisms} \format{ A \link{data.frame} with 67,151 observations and 16 variables: \itemize{ @@ -13,7 +13,7 @@ A \link{data.frame} with 67,151 observations and 16 variables: \item \code{rank}\cr Text of the taxonomic rank of the microorganism, like \code{"species"} or \code{"genus"} \item \code{ref}\cr Author(s) and year of concerning scientific publication \item \code{species_id}\cr ID of the species as used by the Catalogue of Life -\item \code{source}\cr Either "CoL", "DSMZ" (see Source) or "manually added" +\item \code{source}\cr Either "CoL", "DSMZ" (see \emph{Source}) or "manually added" \item \code{prevalence}\cr Prevalence of the microorganism, see \code{\link[=as.mo]{as.mo()}} \item \code{snomed}\cr SNOMED code of the microorganism. Use \code{\link[=mo_snomed]{mo_snomed()}} to retrieve it quickly, see \code{\link[=mo_property]{mo_property()}}. } @@ -63,7 +63,7 @@ The file in \R format (with preserved data structure) can be found here: } } } -\section{About the records from DSMZ (see source)}{ +\section{About the Records from DSMZ (see \emph{Source})}{ Names of prokaryotes are defined as being validly published by the International Code of Nomenclature of Bacteria. Validly published are all names which are included in the Approved Lists of Bacterial Names and the names subsequently published in the International Journal of Systematic Bacteriology (IJSB) and, from January 2000, in the International Journal of Systematic and Evolutionary Microbiology (IJSEM) as original articles or in the validation lists. \emph{(from \url{https://www.dsmz.de/services/online-tools/prokaryotic-nomenclature-up-to-date})} @@ -79,12 +79,12 @@ This package contains the complete taxonomic tree of almost all microorganisms ( \link[=catalogue_of_life]{Click here} for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with \code{\link[=catalogue_of_life_version]{catalogue_of_life_version()}}. } -\section{Reference data publicly available}{ +\section{Reference Data Publicly Available}{ All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{AMR} package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/microorganisms.codes.Rd b/man/microorganisms.codes.Rd index 6b5611a0..f58a5132 100644 --- a/man/microorganisms.codes.Rd +++ b/man/microorganisms.codes.Rd @@ -3,7 +3,7 @@ \docType{data} \name{microorganisms.codes} \alias{microorganisms.codes} -\title{Data set with 5,580 common microorganism codes} +\title{Data Set with 5,580 Common Microorganism Codes} \format{ A \link{data.frame} with 5,580 observations and 2 variables: \itemize{ @@ -17,7 +17,7 @@ microorganisms.codes \description{ A data set containing commonly used codes for microorganisms, from laboratory systems and WHONET. Define your own with \code{\link[=set_mo_source]{set_mo_source()}}. They will all be searched when using \code{\link[=as.mo]{as.mo()}} and consequently all the \code{\link[=mo_property]{mo_*}} functions. } -\section{Reference data publicly available}{ +\section{Reference Data Publicly Available}{ All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{AMR} package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change. } @@ -30,7 +30,7 @@ This package contains the complete taxonomic tree of almost all microorganisms ( \link[=catalogue_of_life]{Click here} for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with \code{\link[=catalogue_of_life_version]{catalogue_of_life_version()}}. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/microorganisms.old.Rd b/man/microorganisms.old.Rd index ab837042..29df4182 100644 --- a/man/microorganisms.old.Rd +++ b/man/microorganisms.old.Rd @@ -3,7 +3,7 @@ \docType{data} \name{microorganisms.old} \alias{microorganisms.old} -\title{Data set with previously accepted taxonomic names} +\title{Data Set with Previously Accepted Taxonomic Names} \format{ A \link{data.frame} with 12,708 observations and 4 variables: \itemize{ @@ -32,12 +32,12 @@ This package contains the complete taxonomic tree of almost all microorganisms ( \link[=catalogue_of_life]{Click here} for more information about the included taxa. Check which versions of the CoL and LSPN were included in this package with \code{\link[=catalogue_of_life_version]{catalogue_of_life_version()}}. } -\section{Reference data publicly available}{ +\section{Reference Data Publicly Available}{ All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{AMR} package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/mo_matching_score.Rd b/man/mo_matching_score.Rd index bb5f8862..2db9c62a 100644 --- a/man/mo_matching_score.Rd +++ b/man/mo_matching_score.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/mo_matching_score.R \name{mo_matching_score} \alias{mo_matching_score} -\title{Calculate the matching score for microorganisms} +\title{Calculate the Matching Score for Microorganisms} \usage{ mo_matching_score(x, n) } @@ -14,7 +14,7 @@ mo_matching_score(x, n) \description{ This algorithm is used by \code{\link[=as.mo]{as.mo()}} and all the \code{\link[=mo_property]{mo_*}} functions to determine the most probable match of taxonomic records based on user input. } -\section{Matching score for microorganisms}{ +\section{Matching Score for Microorganisms}{ With ambiguous user input in \code{\link[=as.mo]{as.mo()}} and all the \code{\link[=mo_property]{mo_*}} functions, the returned results are chosen based on their matching score using \code{\link[=mo_matching_score]{mo_matching_score()}}. This matching score \eqn{m}, is calculated as: @@ -35,7 +35,7 @@ The grouping into human pathogenic prevalence (\eqn{p}) is based on experience f All matches are sorted descending on their matching score and for all user input values, the top match will be returned. This will lead to the effect that e.g., \code{"E. coli"} will return the microbial ID of \emph{Escherichia coli} (\eqn{m = 0.688}, a highly prevalent microorganism found in humans) and not \emph{Entamoeba coli} (\eqn{m = 0.079}, a less prevalent microorganism in humans), although the latter would alphabetically come first. } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -43,12 +43,12 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } -\section{Reference data publicly available}{ +\section{Reference Data Publicly Available}{ All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{AMR} package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/mo_property.Rd b/man/mo_property.Rd index ad4faedc..af6d9a4f 100644 --- a/man/mo_property.Rd +++ b/man/mo_property.Rd @@ -29,7 +29,7 @@ \alias{mo_synonyms} \alias{mo_info} \alias{mo_url} -\title{Get properties of a microorganism} +\title{Get Properties of a Microorganism} \usage{ mo_name(x, language = get_locale(), ...) @@ -88,7 +88,7 @@ mo_url(x, open = FALSE, language = get_locale(), ...) mo_property(x, property = "fullname", language = get_locale(), ...) } \arguments{ -\item{x}{any character (vector) that can be coerced to a valid microorganism code with \code{\link[=as.mo]{as.mo()}}. Can be left blank for auto-guessing the column containing microorganism codes if used in a data set, please see \emph{Examples}.} +\item{x}{any character (vector) that can be coerced to a valid microorganism code with \code{\link[=as.mo]{as.mo()}}. Can be left blank for auto-guessing the column containing microorganism codes if used in a data set, see \emph{Examples}.} \item{language}{language of the returned text, defaults to system language (see \code{\link[=get_locale]{get_locale()}}) and can be overwritten by setting the option \code{AMR_locale}, e.g. \code{options(AMR_locale = "de")}, see \link{translate}. Also used to translate text like "no growth". Use \code{language = NULL} or \code{language = ""} to prevent translation.} @@ -110,7 +110,7 @@ mo_property(x, property = "fullname", language = get_locale(), ...) } } \description{ -Use these functions to return a specific property of a microorganism based on the latest accepted taxonomy. All input values will be evaluated internally with \code{\link[=as.mo]{as.mo()}}, which makes it possible to use microbial abbreviations, codes and names as input. Please see \emph{Examples}. +Use these functions to return a specific property of a microorganism based on the latest accepted taxonomy. All input values will be evaluated internally with \code{\link[=as.mo]{as.mo()}}, which makes it possible to use microbial abbreviations, codes and names as input. See \emph{Examples}. } \details{ All functions will return the most recently known taxonomic property according to the Catalogue of Life, except for \code{\link[=mo_ref]{mo_ref()}}, \code{\link[=mo_authors]{mo_authors()}} and \code{\link[=mo_year]{mo_year()}}. Please refer to this example, knowing that \emph{Escherichia blattae} was renamed to \emph{Shimwellia blattae} in 2010: @@ -134,7 +134,7 @@ All output will be \link{translate}d 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. } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -142,7 +142,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } -\section{Matching score for microorganisms}{ +\section{Matching Score for Microorganisms}{ With ambiguous user input in \code{\link[=as.mo]{as.mo()}} and all the \code{\link[=mo_property]{mo_*}} functions, the returned results are chosen based on their matching score using \code{\link[=mo_matching_score]{mo_matching_score()}}. This matching score \eqn{m}, is calculated as: @@ -182,12 +182,12 @@ This package contains the complete taxonomic tree of almost all microorganisms ( } } -\section{Reference data publicly available}{ +\section{Reference Data Publicly Available}{ All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{AMR} package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/mo_source.Rd b/man/mo_source.Rd index d37135e7..66d52a9b 100644 --- a/man/mo_source.Rd +++ b/man/mo_source.Rd @@ -4,7 +4,7 @@ \alias{mo_source} \alias{set_mo_source} \alias{get_mo_source} -\title{User-defined reference data set for microorganisms} +\title{User-Defined Reference Data Set for Microorganisms} \usage{ set_mo_source( path, @@ -14,7 +14,7 @@ set_mo_source( get_mo_source(destination = getOption("AMR_mo_source", "~/mo_source.rds")) } \arguments{ -\item{path}{location of your reference file, see Details. Can be \code{""}, \code{NULL} or \code{FALSE} to delete the reference file.} +\item{path}{location of your reference file, see \emph{Details}. Can be \code{""}, \code{NULL} or \code{FALSE} to delete the reference file.} \item{destination}{destination of the compressed data file, default to the user's home directory.} } @@ -34,7 +34,7 @@ The function \code{\link[=get_mo_source]{get_mo_source()}} will return the data Reading an Excel file (\code{.xlsx}) with only one row has a size of 8-9 kB. The compressed file created with \code{\link[=set_mo_source]{set_mo_source()}} will then have a size of 0.1 kB and can be read by \code{\link[=get_mo_source]{get_mo_source()}} in only a couple of microseconds (millionths of a second). } -\section{How to setup}{ +\section{How to Setup}{ Imagine this data on a sheet of an Excel file (mo codes were looked up in the \link{microorganisms} data set). The first column contains the organisation specific codes, the second column contains an MO code from this package:\preformatted{ | A | B | @@ -95,7 +95,7 @@ To delete the reference data file, just use \code{""}, \code{NULL} or \code{FALS If the original file (in the previous case an Excel file) is moved or deleted, the \code{mo_source.rds} file will be removed upon the next use of \code{\link[=as.mo]{as.mo()}} or any \code{\link[=mo_property]{mo_*}} function. } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -103,7 +103,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/pca.Rd b/man/pca.Rd index 68aaa8ba..c24f142e 100644 --- a/man/pca.Rd +++ b/man/pca.Rd @@ -59,12 +59,17 @@ The \code{\link[=pca]{pca()}} function takes a \link{data.frame} as input and pe The result of the \code{\link[=pca]{pca()}} function is a \link{prcomp} object, with an additional attribute \code{non_numeric_cols} which is a vector with the column names of all columns that do not contain numeric values. These are probably the groups and labels, and will be used by \code{\link[=ggplot_pca]{ggplot_pca()}}. } -\section{Maturing lifecycle}{ +\section{Maturing Lifecycle}{ \if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. Since this function needs wider usage and more extensive testing, you are very welcome \href{https://github.com/msberends/AMR/issues}{to suggest changes at our repository} or \link[=AMR]{write us an email (see section 'Contact Us')}. } +\section{Read more on Our Website!}{ + +On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! +} + \examples{ # `example_isolates` is a dataset available in the AMR package. # See ?example_isolates. diff --git a/man/plot.Rd b/man/plot.Rd index cec2df39..28e32175 100644 --- a/man/plot.Rd +++ b/man/plot.Rd @@ -7,7 +7,7 @@ \alias{barplot.mic} \alias{plot.rsi} \alias{barplot.rsi} -\title{Plotting for classes \code{rsi}, \code{mic} and \code{disk}} +\title{Plotting for Classes \code{rsi}, \code{mic} and \code{disk}} \usage{ \method{plot}{disk}( x, @@ -98,7 +98,7 @@ \description{ Functions to print classes of the \code{AMR} package. } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -106,7 +106,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/proportion.Rd b/man/proportion.Rd index 8ecfc362..5792462f 100644 --- a/man/proportion.Rd +++ b/man/proportion.Rd @@ -12,7 +12,7 @@ \alias{proportion_S} \alias{proportion_df} \alias{rsi_df} -\title{Calculate microbial resistance} +\title{Calculate Microbial Resistance} \source{ \strong{M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition}, 2014, \emph{Clinical and Laboratory Standards Institute (CLSI)}. \url{https://clsi.org/standards/products/microbiology/documents/m39/}. } @@ -52,13 +52,13 @@ rsi_df( ) } \arguments{ -\item{...}{one or more vectors (or columns) with antibiotic interpretations. They will be transformed internally with \code{\link[=as.rsi]{as.rsi()}} if needed. Use multiple columns to calculate (the lack of) co-resistance: the probability where one of two drugs have a resistant or susceptible result. See Examples.} +\item{...}{one or more vectors (or columns) with antibiotic interpretations. They will be transformed internally with \code{\link[=as.rsi]{as.rsi()}} if needed. Use multiple columns to calculate (the lack of) co-resistance: the probability where one of two drugs have a resistant or susceptible result. See \emph{Examples}.} -\item{minimum}{the minimum allowed number of available (tested) isolates. Any isolate count lower than \code{minimum} will return \code{NA} with a warning. The default number of \code{30} isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see Source.} +\item{minimum}{the minimum allowed number of available (tested) isolates. Any isolate count lower than \code{minimum} will return \code{NA} with a warning. The default number of \code{30} isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see \emph{Source}.} \item{as_percent}{a logical to indicate whether the output must be returned as a hundred fold with \% sign (a character). A value of \code{0.123456} will then be returned as \code{"12.3\%"}.} -\item{only_all_tested}{(for combination therapies, i.e. using more than one variable for \code{...}): a logical to indicate that isolates must be tested for all antibiotics, see section \emph{Combination therapy} below} +\item{only_all_tested}{(for combination therapies, i.e. using more than one variable for \code{...}): a logical to indicate that isolates must be tested for all antibiotics, see section \emph{Combination Therapy} below} \item{data}{a \link{data.frame} containing columns with class \code{\link{rsi}} (see \code{\link[=as.rsi]{as.rsi()}})} @@ -74,7 +74,7 @@ rsi_df( A \link{double} or, when \code{as_percent = TRUE}, a \link{character}. } \description{ -These functions can be used to calculate the (co-)resistance or susceptibility of microbial isolates (i.e. percentage of S, SI, I, IR or R). All functions support quasiquotation with pipes, can be used in \code{summarise()} from the \code{dplyr} package and also support grouped variables, please see \emph{Examples}. +These functions can be used to calculate the (co-)resistance or susceptibility of microbial isolates (i.e. percentage of S, SI, I, IR or R). All functions support quasiquotation with pipes, can be used in \code{summarise()} from the \code{dplyr} package and also support grouped variables, see \emph{Examples}. \code{\link[=resistance]{resistance()}} should be used to calculate resistance, \code{\link[=susceptibility]{susceptibility()}} should be used to calculate susceptibility.\cr } @@ -87,7 +87,7 @@ These functions are not meant to count isolates, but to calculate the proportion The function \code{\link[=proportion_df]{proportion_df()}} takes any variable from \code{data} that has an \code{\link{rsi}} class (created with \code{\link[=as.rsi]{as.rsi()}}) and calculates the proportions R, I and S. It also supports grouped variables. The function \code{\link[=rsi_df]{rsi_df()}} works exactly like \code{\link[=proportion_df]{proportion_df()}}, but adds the number of isolates. } -\section{Combination therapy}{ +\section{Combination Therapy}{ When using more than one variable for \code{...} (= combination therapy), use \code{only_all_tested} to only count isolates that are tested for all antibiotics/variables that you test them for. See this example for two antibiotics, Drug A and Drug B, about how \code{\link[=susceptibility]{susceptibility()}} works to calculate the \%SI:\preformatted{-------------------------------------------------------------------- only_all_tested = FALSE only_all_tested = TRUE @@ -118,7 +118,7 @@ and that, in combination therapies, for \code{only_all_tested = FALSE} applies t Using \code{only_all_tested} has no impact when only using one antibiotic as input. } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -141,7 +141,7 @@ A microorganism is categorised as \emph{Susceptible, Increased exposure} when th This AMR package honours this new insight. Use \code{\link[=susceptibility]{susceptibility()}} (equal to \code{\link[=proportion_SI]{proportion_SI()}}) to determine antimicrobial susceptibility and \code{\link[=count_susceptible]{count_susceptible()}} (equal to \code{\link[=count_SI]{count_SI()}}) to count susceptible isolates. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/random.Rd b/man/random.Rd index 338acf4a..183cee04 100644 --- a/man/random.Rd +++ b/man/random.Rd @@ -5,7 +5,7 @@ \alias{random_mic} \alias{random_disk} \alias{random_rsi} -\title{Random MIC values/disk zones/RSI generation} +\title{Random MIC Values/Disk Zones/RSI Generation} \usage{ random_mic(size, mo = NULL, ab = NULL, ...) @@ -35,13 +35,13 @@ The base R function \code{\link[=sample]{sample()}} is used for generating value Generated values are based on the latest EUCAST guideline implemented in the \link{rsi_translation} data set. To create specific generated values per bug or drug, set the \code{mo} and/or \code{ab} argument. } -\section{Maturing lifecycle}{ +\section{Maturing Lifecycle}{ \if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. Since this function needs wider usage and more extensive testing, you are very welcome \href{https://github.com/msberends/AMR/issues}{to suggest changes at our repository} or \link[=AMR]{write us an email (see section 'Contact Us')}. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/resistance_predict.Rd b/man/resistance_predict.Rd index d26c9623..05f82165 100644 --- a/man/resistance_predict.Rd +++ b/man/resistance_predict.Rd @@ -61,7 +61,7 @@ ggplot_rsi_predict( \item{minimum}{minimal amount of available isolates per year to include. Years containing less observations will be estimated by the model.} -\item{model}{the statistical model of choice. This could be a generalised linear regression model with binomial distribution (i.e. using `glm(..., family = binomial)``, assuming that a period of zero resistance was followed by a period of increasing resistance leading slowly to more and more resistance. See Details for all valid options.} +\item{model}{the statistical model of choice. This could be a generalised linear regression model with binomial distribution (i.e. using `glm(..., family = binomial)``, assuming that a period of zero resistance was followed by a period of increasing resistance leading slowly to more and more resistance. See \emph{Details} for all valid options.} \item{I_as_S}{a logical to indicate whether values \code{"I"} should be treated as \code{"S"} (will otherwise be treated as \code{"R"}). The default, \code{TRUE}, follows the redefinition by EUCAST about the interpretation of I (increased exposure) in 2019, see section \emph{Interpretation of S, I and R} below.} @@ -87,7 +87,7 @@ A \link{data.frame} with extra class \code{\link{resistance_predict}} with colum \item \code{estimated}, the estimated resistant percentages, calculated by the model } -Furthermore, the model itself is available as an attribute: \code{attributes(x)$model}, please see \emph{Examples}. +Furthermore, the model itself is available as an attribute: \code{attributes(x)$model}, see \emph{Examples}. } \description{ Create a prediction model to predict antimicrobial resistance for the next years on statistical solid ground. Standard errors (SE) will be returned as columns \code{se_min} and \code{se_max}. See \emph{Examples} for a real live example. @@ -100,7 +100,7 @@ Valid options for the statistical model (argument \code{model}) are: \item \code{"lin"} or \code{"linear"}: a linear regression model } } -\section{Maturing lifecycle}{ +\section{Maturing Lifecycle}{ \if{html}{\figure{lifecycle_maturing.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{maturing}. The unlying code of a maturing function has been roughed out, but finer details might still change. Since this function needs wider usage and more extensive testing, you are very welcome \href{https://github.com/msberends/AMR/issues}{to suggest changes at our repository} or \link[=AMR]{write us an email (see section 'Contact Us')}. @@ -121,7 +121,7 @@ A microorganism is categorised as \emph{Susceptible, Increased exposure} when th This AMR package honours this new insight. Use \code{\link[=susceptibility]{susceptibility()}} (equal to \code{\link[=proportion_SI]{proportion_SI()}}) to determine antimicrobial susceptibility and \code{\link[=count_susceptible]{count_susceptible()}} (equal to \code{\link[=count_SI]{count_SI()}}) to count susceptible isolates. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/rsi_translation.Rd b/man/rsi_translation.Rd index d3750be0..7c6488d1 100644 --- a/man/rsi_translation.Rd +++ b/man/rsi_translation.Rd @@ -3,7 +3,7 @@ \docType{data} \name{rsi_translation} \alias{rsi_translation} -\title{Data set for R/SI interpretation} +\title{Data Set for R/SI Interpretation} \format{ A \link{data.frame} with 20,486 observations and 10 variables: \itemize{ @@ -28,12 +28,12 @@ Data set to interpret MIC and disk diffusion to R/SI values. Included guidelines \details{ The repository of this \code{AMR} package contains a file comprising this exact data set: \url{https://github.com/msberends/AMR/blob/master/data-raw/rsi_translation.txt}. This file \strong{allows for machine reading EUCAST and CLSI guidelines}, which is almost impossible with the Excel and PDF files distributed by EUCAST and CLSI. The file is updated automatically. } -\section{Reference data publicly available}{ +\section{Reference Data Publicly Available}{ All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{AMR} package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/skewness.Rd b/man/skewness.Rd index 46bff595..b2e2d611 100644 --- a/man/skewness.Rd +++ b/man/skewness.Rd @@ -5,7 +5,7 @@ \alias{skewness.default} \alias{skewness.matrix} \alias{skewness.data.frame} -\title{Skewness of the sample} +\title{Skewness of the Sample} \usage{ skewness(x, na.rm = FALSE) @@ -25,7 +25,7 @@ Skewness is a measure of the asymmetry of the probability distribution of a real When negative ('left-skewed'): the left tail is longer; the mass of the distribution is concentrated on the right of a histogram. When positive ('right-skewed'): the right tail is longer; the mass of the distribution is concentrated on the left of a histogram. A normal distribution has a skewness of 0. } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -33,7 +33,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/man/translate.Rd b/man/translate.Rd index 172fd97b..4963e96b 100644 --- a/man/translate.Rd +++ b/man/translate.Rd @@ -3,7 +3,7 @@ \name{translate} \alias{translate} \alias{get_locale} -\title{Translate strings from AMR package} +\title{Translate Strings from AMR Package} \usage{ get_locale() } @@ -16,7 +16,7 @@ Strings will be translated to foreign languages if they are defined in a local t Currently supported languages are: Dutch, English, French, German, Italian, Portuguese, Spanish. Please note that currently not all these languages have translations available for all antimicrobial agents and colloquial microorganism names. Please suggest your own translations \href{https://github.com/msberends/AMR/issues/new?title=Translations}{by creating a new issue on our repository}. -\subsection{Changing the default language}{ +\subsection{Changing the Default Language}{ The system language will be used at default (as returned by \code{Sys.getenv("LANG")} or, if \code{LANG} is not set, \code{\link[=Sys.getlocale]{Sys.getlocale()}}), if that language is supported. But the language to be used can be overwritten in two ways and will be checked in this order: \enumerate{ @@ -27,7 +27,7 @@ The system language will be used at default (as returned by \code{Sys.getenv("LA So if the R option \code{AMR_locale} is set, the system variables \code{LANGUAGE} and \code{LANG} will be ignored. } } -\section{Stable lifecycle}{ +\section{Stable Lifecycle}{ \if{html}{\figure{lifecycle_stable.svg}{options: style=margin-bottom:5px} \cr} The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided. @@ -35,7 +35,7 @@ The \link[=lifecycle]{lifecycle} of this function is \strong{stable}. In a stabl If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error. } -\section{Read more on our website!}{ +\section{Read more on Our Website!}{ On our website \url{https://msberends.github.io/AMR/} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference/}{complete documentation of all functions} and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! } diff --git a/tests/testthat/test-mdro.R b/tests/testthat/test-mdro.R index 9ca66ce1..b4f3fd84 100755 --- a/tests/testthat/test-mdro.R +++ b/tests/testthat/test-mdro.R @@ -225,13 +225,21 @@ test_that("mdro works", { # custom rules custom <- custom_mdro_guideline("CIP == 'R' & age > 60" ~ "Elderly Type A", - "ERY == 'R' & age > 60" ~ "Elderly Type B") + "ERY == 'R' & age > 60" ~ "Elderly Type B", + as_factor = TRUE) expect_output(print(custom)) x <- mdro(example_isolates, guideline = custom, info = TRUE) expect_equal(as.double(table(x)), c(43, 891, 1066)) + + expect_output(print(custom_mdro_guideline(AMX == "R" ~ "test", as_factor = FALSE))) expect_error(custom_mdro_guideline()) expect_error(custom_mdro_guideline("test")) expect_error(custom_mdro_guideline("test" ~ c(1:3))) expect_error(custom_mdro_guideline("test" ~ A)) + expect_error(custom_mdro_guideline(test ~ "A")) + expect_warning(mdro(example_isolates, + # since `test` gives an error, it will be ignored with a warning + guideline = custom_mdro_guideline(test ~ "A"), + info = FALSE)) }) diff --git a/vignettes/datasets.Rmd b/vignettes/datasets.Rmd index d2c22c94..b9803716 100644 --- a/vignettes/datasets.Rmd +++ b/vignettes/datasets.Rmd @@ -250,3 +250,25 @@ rsi_translation %>% mutate(ab = ab_name(ab), mo = mo_name(mo)) %>% print_df() ``` + + +## Dosage guidelines from EUCAST + +`r structure_txt(dosage)` + +This data set is in R available as `dosage`, after you load the `AMR` package. + +`r download_txt("dosage")` + +### Source + +EUCAST breakpoints used in this package are based on the dosages in this data set. + +Currently included dosages in the data set are meant for: `r AMR:::format_eucast_version_nr(unique(dosage$eucast_version))`. + +### Example content + +```{r, echo = FALSE} +dosage %>% + print_df() +```-@@ -249,7 +249,7 @@Translate strings from AMR package
+Translate Strings from AMR Package
Source:R/translate.R
translate.Rd
Strings will be translated to foreign languages if they are defined in a local translation file. Additions to this file can be suggested at our repository. The file can be found here: https://github.com/msberends/AMR/blob/master/data-raw/translations.tsv. This file will be read by all functions where a translated output can be desired, like all
mo_*
functions (such asmo_name()
,mo_gramstain()
,mo_type()
, etc.) andab_*
functions (such asab_name()
,ab_group()
, etc.).Currently supported languages are: Dutch, English, French, German, Italian, Portuguese, Spanish. Please note that currently not all these languages have translations available for all antimicrobial agents and colloquial microorganism names.
-Please suggest your own translations by creating a new issue on our repository.
Changing the default language
+Please suggest your own translations by creating a new issue on our repository.
Changing the Default Language
The system language will be used at default (as returned by
Sys.getenv("LANG")
or, ifLANG
is not set,Sys.getlocale()
), if that language is supported. But the language to be used can be overwritten in two ways and will be checked in this order:@@ -259,14 +259,14 @@
So if the R option
-AMR_locale
is set, the system variablesLANGUAGE
andLANG
will be ignored.Stable lifecycle
+Stable Lifecycle
The lifecycle of this function is stable. In a stable function, major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; removing arguments or changing the meaning of existing arguments will be avoided.If the unlying code needs breaking changes, they will occur gradually. For example, a argument will be deprecated and first continue to work, but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
-Read more on our website!
+Read more on Our Website!
diff --git a/docs/survey.html b/docs/survey.html index 50de92e6..636d9446 100644 --- a/docs/survey.html +++ b/docs/survey.html @@ -81,7 +81,7 @@