diff --git a/DESCRIPTION b/DESCRIPTION index 84422237..7636222b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 1.1.0.9013 +Version: 1.1.0.9014 Date: 2020-05-19 Title: Antimicrobial Resistance Analysis Authors@R: c( @@ -38,13 +38,11 @@ Depends: R (>= 3.0.0) Suggests: cleaner, - covr, dplyr, ggplot2, knitr, microbenchmark, rmarkdown, - rvest, testthat, tidyr, utils diff --git a/NEWS.md b/NEWS.md index bf92cc65..3b30ebbd 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,15 +1,15 @@ -# AMR 1.1.0.9013 +# AMR 1.1.0.9014 ## Last updated: 19-May-2020 ### Breaking -* Removed code dependency on **all** R packages that this `AMR` package required: `cleaner`, `crayon`, `data.table`, `dplyr`, `ggplot2`, `knitr`, `microbenchmark`, `pillar`, `R6`, `rlang`, `tidyr` and `vctrs`. This is a major code change, but will probably not be noticeable by most users. +* Removed code dependency on all other R packages: `cleaner`, `crayon`, `data.table`, `dplyr`, `ggplot2`, `knitr`, `microbenchmark`, `pillar`, `R6`, `rlang`, `tidyr` and `vctrs`. This is a major code change, but will probably not be noticeable by most users. Making this package independent on especially the tidyverse tremendously increases sustainability on the long term, since tidyverse functions change quite often. 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: * Function `freq()` that was borrowed from the `cleaner` package was removed. Use `cleaner::freq()`, or run `library("cleaner")` before you use `freq()`. * Printing values of class `mo` or `ab` in a tibble will no longer be in colour. - * All functions from the `mo_*` family (like `mo_name()` and `mo_gramstain()`) are noticeably slower when running on tens of thousands of rows. + * All functions from the `mo_*` family (like `mo_name()` and `mo_gramstain()`) are noticeably slower when running on hundreds of thousands of rows. * For developers: classes `mo` and `ab` now both also inherit class `character`, to support any data transformation. This change invalidates code that checks for class length == 1. ### Changed diff --git a/R/like.R b/R/like.R index 42e7a6cb..964fea10 100755 --- a/R/like.R +++ b/R/like.R @@ -60,8 +60,7 @@ #' \dontrun{ #' library(dplyr) #' example_isolates %>% -#' filter(mo_name(mo) %like% "^ent") %>% -#' freq(mo) +#' filter(mo_name(mo) %like% "^ent") #' } like <- function(x, pattern, ignore.case = TRUE) { # set to fixed if no regex found diff --git a/R/mdro.R b/R/mdro.R index adac0965..b515687e 100755 --- a/R/mdro.R +++ b/R/mdro.R @@ -68,6 +68,7 @@ #' @examples #' \dontrun{ #' library(dplyr) +#' library(cleaner) #' #' example_isolates %>% #' mdro() %>% diff --git a/docs/404.html b/docs/404.html index 0e7c7e3f..769e3500 100644 --- a/docs/404.html +++ b/docs/404.html @@ -81,7 +81,7 @@
diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 6b52a397..11879079 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -81,7 +81,7 @@ diff --git a/docs/articles/AMR.html b/docs/articles/AMR.html index bbc4833d..6b1e2c66 100644 --- a/docs/articles/AMR.html +++ b/docs/articles/AMR.html @@ -39,7 +39,7 @@ @@ -186,7 +186,7 @@vignettes/AMR.Rmd
AMR.Rmd
Note: values on this page will change with every website update since they are based on randomly created values and the page was written in R Markdown. However, the methodology remains unchanged. This page was generated on 18 May 2020.
+Note: values on this page will change with every website update since they are based on randomly created values and the page was written in R Markdown. However, the methodology remains unchanged. This page was generated on 19 May 2020.
As with many uses in R, we need some additional packages for AMR analysis. Our package works closely together with the tidyverse packages dplyr
and ggplot2
by Dr Hadley Wickham. The tidyverse tremendously improves the way we conduct data science - it allows for a very natural way of writing syntaxes and creating beautiful plots in R.
Our AMR
package depends on these packages and even extends their use and functions.
As with many uses in R, we need some additional packages for AMR analysis. Our package works closely together with the tidyverse packages dplyr
and ggplot2
by RStudio. The tidyverse tremendously improves the way we conduct data science - it allows for a very natural way of writing syntaxes and creating beautiful plots in R.
We will also use the cleaner
package, that can be used for cleaning data and creating frequency tables.
library(dplyr) library(ggplot2) library(AMR) +library(cleaner) # (if not yet installed, install with:) -# install.packages(c("dplyr", "ggplot2", "AMR"))