diff --git a/DESCRIPTION b/DESCRIPTION index 0d13288e..3fd5df79 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 1.7.0.9001 +Version: 1.7.0.9002 Date: 2021-06-01 Title: Antimicrobial Resistance Data Analysis Authors@R: c( diff --git a/NEWS.md b/NEWS.md index fa4847c2..820f36e3 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# `AMR` 1.7.0.9001 +# `AMR` 1.7.0.9002 ## Last updated: 1 June 2021 ### New diff --git a/data-raw/AMR_latest.tar.gz b/data-raw/AMR_latest.tar.gz index d22c4bfa..dafcaadc 100644 Binary files a/data-raw/AMR_latest.tar.gz and b/data-raw/AMR_latest.tar.gz differ diff --git a/data-raw/rsi.md5 b/data-raw/rsi.md5 index 63ef7521..ee35a907 100644 --- a/data-raw/rsi.md5 +++ b/data-raw/rsi.md5 @@ -1 +1 @@ -a4388a944969e5961917f72383156d33 +1a7fe52f8185c9bb2c470712863d1887 diff --git a/data-raw/rsi_translation.dta b/data-raw/rsi_translation.dta index 5cc7cc9c..4cc6fa64 100644 Binary files a/data-raw/rsi_translation.dta and b/data-raw/rsi_translation.dta differ diff --git a/data-raw/rsi_translation.rds b/data-raw/rsi_translation.rds index 9cc4e4b5..7c32865d 100644 Binary files a/data-raw/rsi_translation.rds and b/data-raw/rsi_translation.rds differ diff --git a/data-raw/rsi_translation.sas b/data-raw/rsi_translation.sas index 8ab8f026..4df1e081 100644 Binary files a/data-raw/rsi_translation.sas and b/data-raw/rsi_translation.sas differ diff --git a/data-raw/rsi_translation.sav b/data-raw/rsi_translation.sav index 47ba090d..7d7661d6 100644 Binary files a/data-raw/rsi_translation.sav and b/data-raw/rsi_translation.sav differ diff --git a/data-raw/rsi_translation.txt b/data-raw/rsi_translation.txt index 8b3d409d..eed44c58 100644 --- a/data-raw/rsi_translation.txt +++ b/data-raw/rsi_translation.txt @@ -10059,7 +10059,7 @@ "CLSI 2020" "MIC" "Vibrio" "Ampicillin/sulbactam" "M45 Table 20" 8 32 FALSE "CLSI 2020" "DISK" "(unknown name)" "Ampicillin/sulbactam" "Generic CLSI rules" "10-10ug" 15 11 FALSE "CLSI 2020" "MIC" "(unknown name)" "Ampicillin/sulbactam" "Generic CLSI rules" "10-10ug" 8 32 FALSE -"CLSI 2020" "DISK" "Enterobacteriaceae" "Sulfamethoxazole" "Table 2A" "200 – 300ug" 17 12 FALSE +"CLSI 2020" "DISK" "Enterobacteriaceae" "Sulfamethoxazole" "Table 2A" "200 - 300ug" 17 12 FALSE "CLSI 2020" "MIC" "Enterobacteriaceae" "Sulfamethoxazole" "Table 2A" 256 512 FALSE "CLSI 2020" "DISK" "Neisseria meningitidis" "Sulfamethoxazole" "Table 2I" "200-300ug" FALSE "CLSI 2020" "MIC" "Neisseria meningitidis" "Sulfamethoxazole" "Table 2I" 2 8 FALSE @@ -10068,7 +10068,7 @@ "CLSI 2020" "DISK" "Vibrio" "Sulfamethoxazole" "M45 Table 20" "200ug" 17 12 FALSE "CLSI 2020" "DISK" "(unknown name)" "Sulfamethoxazole" "Generic CLSI rules" "200-300ug" 17 12 FALSE "CLSI 2020" "MIC" "(unknown name)" "Sulfamethoxazole" "Generic CLSI rules" "200-300ug" 256 512 FALSE -"CLSI 2020" "DISK" "Enterobacteriaceae" "Sulfisoxazole" "Table 2A" "200 – 300ug" 17 12 FALSE +"CLSI 2020" "DISK" "Enterobacteriaceae" "Sulfisoxazole" "Table 2A" "200 - 300ug" 17 12 FALSE "CLSI 2020" "MIC" "Enterobacteriaceae" "Sulfisoxazole" "Table 2A" 256 512 FALSE "CLSI 2020" "DISK" "Neisseria meningitidis" "Sulfisoxazole" "Table 2I" "200-300ug" FALSE "CLSI 2020" "MIC" "Neisseria meningitidis" "Sulfisoxazole" "Table 2I" 2 8 FALSE @@ -10092,7 +10092,7 @@ "CLSI 2020" "MIC" "Streptococcus pneumoniae" "Sparfloxacin" "Table 2G" 0.5 2 FALSE "CLSI 2020" "DISK" "(unknown name)" "Sparfloxacin" "Generic CLSI rules" "5ug" 19 15 FALSE "CLSI 2020" "MIC" "(unknown name)" "Sparfloxacin" "Generic CLSI rules" "5ug" 0.5 2 FALSE -"CLSI 2020" "DISK" "Enterobacteriaceae" "Sulfonamide" "Table 2A" "200 – 300ug" 17 12 FALSE +"CLSI 2020" "DISK" "Enterobacteriaceae" "Sulfonamide" "Table 2A" "200 - 300ug" 17 12 FALSE "CLSI 2020" "MIC" "Enterobacteriaceae" "Sulfonamide" "Table 2A" 256 512 FALSE "CLSI 2020" "DISK" "Neisseria meningitidis" "Sulfonamide" "Table 2I" "200-300ug" FALSE "CLSI 2020" "MIC" "Neisseria meningitidis" "Sulfonamide" "Table 2I" 2 8 FALSE diff --git a/data-raw/rsi_translation.xlsx b/data-raw/rsi_translation.xlsx index c2956852..0b25c4ca 100644 Binary files a/data-raw/rsi_translation.xlsx and b/data-raw/rsi_translation.xlsx differ diff --git a/data/rsi_translation.rda b/data/rsi_translation.rda index 1626d84c..01889a76 100644 Binary files a/data/rsi_translation.rda and b/data/rsi_translation.rda differ diff --git a/docs/404.html b/docs/404.html index 9f6c5985..dbf8025b 100644 --- a/docs/404.html +++ b/docs/404.html @@ -81,7 +81,7 @@ Interpretation from MIC values / disk diameters to R/SI
diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index f1f7cab0..4efddbc9 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -81,7 +81,7 @@ diff --git a/docs/articles/datasets.html b/docs/articles/datasets.html index 57eac212..57a32e65 100644 --- a/docs/articles/datasets.html +++ b/docs/articles/datasets.html @@ -39,7 +39,7 @@ @@ -1007,7 +1007,7 @@ If you are reading this page from within R, pleaseA data set with 21,996 rows and 10 columns, containing the following column names:
guideline, method, site, mo, ab, ref_tbl, disk_dose, breakpoint_S, breakpoint_R and uti.
This data set is in R available as rsi_translation
, after you load the AMR
package.
It was last updated on 1 June 2021 06:44:05 UTC. Find more info about the structure of this data set here.
+It was last updated on 1 June 2021 14:31:18 UTC. Find more info about the structure of this data set here.
Direct download links:
NEWS.md
- AMR
1.7.0.9001AMR
1.7.0.9002betalactams()
as additional antbiotic column selector and function filter_betalactams()
as additional antbiotic column filter. The group of betalactams consists of all carbapenems, cephalosporins and penicillins.ggplot()
method for resistance_predict()
+ggplot()
method for resistance_predict()
Support for custom MDRO guidelines, using the new custom_mdro_guideline()
function, please see mdro()
for additional info
ggplot()
generics for classes <mic>
and <disk>
ggplot()
generics for classes <mic>
and <disk>
Function mo_is_yeast()
, which determines whether a microorganism is a member of the taxonomic class Saccharomycetes or the taxonomic order Saccharomycetales:
@@ -464,7 +464,7 @@
translate
)plot()
and with ggplot2 using ggplot()
on any vector of MIC and disk diffusion valuesplot()
and with ggplot2 using ggplot()
on any vector of MIC and disk diffusion valuesmicroorganisms
data setis.rsi.eligible()
now detects if the column name resembles an antibiotic name or code and now returns TRUE
immediately if the input contains any of the values “R”, “S” or “I”. This drastically improves speed, also for a lot of other functions that rely on automatic determination of antibiotic columns.
get_episode()
and is_new_episode()
now support less than a day as value for argument episode_days
(e.g., to include one patient/test per hour)ampc_cephalosporin_resistance
in eucast_rules()
now also applies to value “I” (not only “S”)print()
and summary()
on a Principal Components Analysis object (pca()
) now print additional group info if the original data was grouped using dplyr::group_by()
+print()
and summary()
on a Principal Components Analysis object (pca()
) now print additional group info if the original data was grouped using dplyr::group_by()
guess_ab_col()
. As this also internally improves the reliability of first_isolate()
and mdro()
, this might have a slight impact on the results of those functions.mo_name()
when used in other languages than EnglishMaking this package independent of especially the tidyverse (e.g. packages dplyr
and tidyr
) tremendously increases sustainability on the long term, since tidyverse functions change quite often. Good for users, but hard for package maintainers. Most of our functions are replaced with versions that only rely on base R, which keeps this package fully functional for many years to come, without requiring a lot of maintenance to keep up with other packages anymore. Another upside it that this package can now be used with all versions of R since R-3.0.0 (April 2013). Our package is being used in settings where the resources are very limited. Fewer dependencies on newer software is helpful for such settings.
Negative effects of this change are:
freq()
that was borrowed from the cleaner
package was removed. Use cleaner::freq()
, or run library("cleaner")
before you use freq()
.freq()
that was borrowed from the cleaner
package was removed. Use cleaner::freq()
, or run library("cleaner")
before you use freq()
.mo
or rsi
in a tibble will no longer be in colour and printing rsi
in a tibble will show the class <ord>
, not <rsi>
anymore. This is purely a visual effect.mo_*
family (like mo_name()
and mo_gramstain()
) are noticeably slower when running on hundreds of thousands of rows.mo
and ab
now both also inherit class character
, to support any data transformation. This change invalidates code that checks for class length == 1.This is important, because a value like "testvalue"
could never be understood by e.g. mo_name()
, although the class would suggest a valid microbial code.
Function freq()
has moved to a new package, clean
(CRAN link), since creating frequency tables actually does not fit the scope of this package. The freq()
function still works, since it is re-exported from the clean
package (which will be installed automatically upon updating this AMR
package).
Function freq()
has moved to a new package, clean
(CRAN link), since creating frequency tables actually does not fit the scope of this package. The freq()
function still works, since it is re-exported from the clean
package (which will be installed automatically upon updating this AMR
package).
Renamed data set septic_patients
to example_isolates
age()
function gained a new argument exact
to determine ages with decimalsguess_mo()
, guess_atc()
, EUCAST_rules()
, interpretive_reading()
, rsi()
freq()
):
+freq()
):
speed improvement for microbial IDs
fixed factor level names for R Markdown
age_groups()
, to let groups of fives and tens end with 100+ instead of 120+freq()
for when all values are NA
+freq()
for when all values are NA
first_isolate()
for when dates are missingguess_ab_col()
@@ -1679,7 +1679,7 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
freq()
function):
+freq()
function):
Support for tidyverse quasiquotation! Now you can create frequency tables of function outcomes:
@@ -1689,15 +1689,15 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/ # OLD WAY septic_patients %>% mutate(genus = mo_genus(mo)) %>% - freq(genus) + freq(genus) # NEW WAY septic_patients %>% - freq(mo_genus(mo)) + freq(mo_genus(mo)) # Even supports grouping variables: septic_patients %>% group_by(gender) %>% - freq(mo_genus(mo)) + freq(mo_genus(mo))Header info is now available as a list, with the header
function
The argument header
is now set to TRUE
at default, even for markdown
Using portion_*
functions now throws a warning when total available isolate is below argument minimum
Functions as.mo
, as.rsi
, as.mic
, as.atc
and freq
will not set package name as attribute anymore
Frequency tables - freq()
:
Frequency tables - freq()
:
Support for grouping variables, test with:
@@ -1787,14 +1787,14 @@ This works for all drug combinations, such as ampicillin/sulbactam, ceftazidime/
septic_patients %>%
group_by(hospital_id) %>%
- freq(gender)
+ freq(gender)
Support for (un)selecting columns:
Check for hms::is.hms
Removed diacritics from all authors (columns microorganisms$ref
and microorganisms.old$ref
) to comply with CRAN policy to only allow ASCII characters
Fix for mo_property
not working properly
Fix for eucast_rules
where some Streptococci would become ceftazidime R in EUCAST rule 4.5
Support for named vectors of class mo
, useful for top_freq()
Support for named vectors of class mo
, useful for top_freq()
ggplot_rsi
and scale_y_percent
have breaks
argument
AI improvements for as.mo
:
For lists, subsetting is possible:
my_list = list(age = septic_patients$age, gender = septic_patients$gender)
-my_list %>% freq(age)
-my_list %>% freq(gender)
rsi
(antimicrobial resistance) to use as inputtable
to use as input: freq(table(x, y))
+table
to use as input: freq(table(x, y))
hist
and plot
to use a frequency table as input: hist(freq(df$age))
as.vector
, as.data.frame
, as_tibble
and format
freq(mydata, mycolumn)
is the same as mydata %>% freq(mycolumn)
+freq(mydata, mycolumn)
is the same as mydata %>% freq(mycolumn)
top_freq
function to return the top/below n items as vector