From 3661df73651de9cf3817fd64ce92bc406d8bdb74 Mon Sep 17 00:00:00 2001 From: "Matthijs S. Berends" Date: Sat, 12 Jan 2019 16:45:20 +0100 Subject: [PATCH] direct warning if failing as.mo --- NEWS.md | 8 ++++---- R/mo.R | 2 +- docs/news/index.html | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/NEWS.md b/NEWS.md index ab842da3..d40f259b 100755 --- a/NEWS.md +++ b/NEWS.md @@ -6,17 +6,17 @@ * New website: https://msberends.gitlab.io/AMR (built with the great [`pkgdown`](https://pkgdown.r-lib.org/)) * Contains the complete manual of this package and all of its functions with an explanation of their parameters * Contains a comprehensive tutorial about how to conduct antimicrobial resistance analysis -* Support for [`dplyr`](https://dplyr.tidyverse.org) version 0.8.0 -* Function `guess_ab_col` to find an antibiotic column in a table +* Support for the upcoming [`dplyr`](https://dplyr.tidyverse.org) version 0.8.0 +* Function `guess_ab_col()` to find an antibiotic column in a table * Function `mo_failures()` to review values that could not be coerced to a valid MO code, using `as.mo()`. This latter function will now only show a maximum of 25 uncoerced values. * Function `mo_renamed()` to get a list of all returned values from `as.mo()` that have had taxonomic renaming * Function `age()` to calculate the (patients) age in years * Function `age_groups()` to split ages into custom or predefined groups (like children or elderly). This allows for easier demographic antimicrobial resistance analysis per age group. * Functions `filter_first_isolate()` and `filter_first_weighted_isolate()` to shorten and fasten filtering on data sets with antimicrobial results, e.g.: ```r - septic_patients %>% filter_first_isolate() + septic_patients %>% filter_first_isolate(...) # or - filter_first_isolate(septic_patients) + filter_first_isolate(septic_patients, ...) ``` is equal to: ```r diff --git a/R/mo.R b/R/mo.R index fe7702f3..54012ed1 100755 --- a/R/mo.R +++ b/R/mo.R @@ -711,7 +711,7 @@ exec_as.mo <- function(x, Becker = FALSE, Lancefield = FALSE, paste('"', unique(failures), '"', sep = "", collapse = ', '), ". See mo_failures() to review them.")), call. = FALSE, - immediate. = FALSE) + immediate. = TRUE) # thus will always be shown, even if >= warnings } } diff --git a/docs/news/index.html b/docs/news/index.html index 384d2edc..25866add 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -232,13 +232,13 @@
  • New website: https://msberends.gitlab.io/AMR (built with the great pkgdown)
  • Contains the complete manual of this package and all of its functions with an explanation of their parameters
  • Contains a comprehensive tutorial about how to conduct antimicrobial resistance analysis
  • -
  • Support for dplyr version 0.8.0
  • -
  • Function guess_ab_col to find an antibiotic column in a table
  • +
  • Support for the upcoming dplyr version 0.8.0
  • +
  • Function guess_ab_col() to find an antibiotic column in a table
  • Function mo_failures() to review values that could not be coerced to a valid MO code, using as.mo(). This latter function will now only show a maximum of 25 uncoerced values.
  • Function mo_renamed() to get a list of all returned values from as.mo() that have had taxonomic renaming
  • Function age() to calculate the (patients) age in years
  • Function age_groups() to split ages into custom or predefined groups (like children or elderly). This allows for easier demographic antimicrobial resistance analysis per age group.
  • -
  • Functions filter_first_isolate() and filter_first_weighted_isolate() to shorten and fasten filtering on data sets with antimicrobial results, e.g.: r septic_patients %>% filter_first_isolate() # or filter_first_isolate(septic_patients) is equal to: r septic_patients %>% mutate(only_firsts = first_isolate(septic_patients, ...)) %>% filter(only_firsts == TRUE) %>% select(-only_firsts) +
  • Functions filter_first_isolate() and filter_first_weighted_isolate() to shorten and fasten filtering on data sets with antimicrobial results, e.g.: r septic_patients %>% filter_first_isolate(...) # or filter_first_isolate(septic_patients, ...) is equal to: r septic_patients %>% mutate(only_firsts = first_isolate(septic_patients, ...)) %>% filter(only_firsts == TRUE) %>% select(-only_firsts)
  • New vignettes about how to conduct AMR analysis, predict antimicrobial resistance, use the G-test and more. These are also available (and even easier readable) on our website: https://msberends.gitlab.io/AMR.