diff --git a/.Rbuildignore b/.Rbuildignore index e63696ad..93557735 100755 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,3 +1,4 @@ +^.*\.RData$ ^.*\.Rproj$ ^\.Renviron$ ^\.Rprofile$ diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index a956ea25..5fd4f193 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -66,8 +66,8 @@ jobs: - {os: ubuntu-20.04, r: '3.5', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} - {os: ubuntu-20.04, r: '3.4', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} - {os: ubuntu-20.04, r: '3.3', allowfail: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} - - {os: ubuntu-20.04, r: '3.2', allowfail: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} - - {os: ubuntu-20.04, r: '3.1', allowfail: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} + # - {os: ubuntu-20.04, r: '3.2', allowfail: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} + # - {os: ubuntu-20.04, r: '3.1', allowfail: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} - {os: ubuntu-20.04, r: '3.0', allowfail: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} - {os: ubuntu-16.04, r: 'devel', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} @@ -78,8 +78,8 @@ jobs: - {os: ubuntu-16.04, r: '3.5', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} - {os: ubuntu-16.04, r: '3.4', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} - {os: ubuntu-16.04, r: '3.3', allowfail: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} - - {os: ubuntu-16.04, r: '3.2', allowfail: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} - - {os: ubuntu-16.04, r: '3.1', allowfail: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} + # - {os: ubuntu-16.04, r: '3.2', allowfail: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} + # - {os: ubuntu-16.04, r: '3.1', allowfail: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} - {os: ubuntu-16.04, r: '3.0', allowfail: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} env: diff --git a/DESCRIPTION b/DESCRIPTION index c9b140a3..0e66d73d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 1.6.0.9001 +Version: 1.6.0.9002 Date: 2021-04-12 Title: Antimicrobial Resistance Data Analysis Authors@R: c( diff --git a/NEWS.md b/NEWS.md index 8bea9a1e..1edb7be2 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 1.6.0.9001 +# AMR 1.6.0.9002 ## Last updated: 12 April 2021 ### New @@ -13,6 +13,7 @@ * Fix for minor translation errors * Printing of microbial codes in a `data.frame` or `tibble` now gives a warning if the data contains old microbial codes (from a previous AMR package version) * `first_isolate()` can now take a vector of values for `col_keyantibiotics` and can have an episode length of `Inf` +* Fixed an installation error on R-3.0 # AMR 1.6.0 diff --git a/R/aa_helper_functions.R b/R/aa_helper_functions.R index 437df607..df9258dc 100755 --- a/R/aa_helper_functions.R +++ b/R/aa_helper_functions.R @@ -1095,8 +1095,8 @@ time_track <- function(name = NULL) { paste("(until now:", trimws(round(as.numeric(Sys.time()) * 1000) - pkg_env$time_start), "ms)") } -# prevent dependency on package 'backports' -# these functions were not available in previous versions of R (last checked: R 4.0.3) +# prevent dependency on package 'backports' ---- +# these functions were not available in previous versions of R (last checked: R 4.0.5) # see here for the full list: https://github.com/r-lib/backports strrep <- function(x, times) { x <- as.character(x) @@ -1143,3 +1143,10 @@ isNamespaceLoaded <- function(pkg) { lengths <- function(x, use.names = TRUE) { vapply(x, length, FUN.VALUE = NA_integer_, USE.NAMES = use.names) } + +if (as.double(R.Version()$major) + (as.double(R.Version()$minor) / 10) < 3.1) { + # R-3.0 does not contain these functions, set them here to prevent installation failure + cospi <- function(...) 1 + sinpi <- function(...) 1 + tanpi <- function(...) 1 +} diff --git a/R/globals.R b/R/globals.R index 7e4d1189..76a73bc8 100755 --- a/R/globals.R +++ b/R/globals.R @@ -66,6 +66,7 @@ globalVariables(c(".rowid", "antibiotics", "atc_group1", "atc_group2", + "base_ab", "code", "cols", "count", diff --git a/data-raw/AMR_latest.tar.gz b/data-raw/AMR_latest.tar.gz index 9e9af29f..e79727c3 100644 Binary files a/data-raw/AMR_latest.tar.gz and b/data-raw/AMR_latest.tar.gz differ diff --git a/docs/404.html b/docs/404.html index 72c83f33..46d2da89 100644 --- a/docs/404.html +++ b/docs/404.html @@ -81,7 +81,7 @@ AMR (for R) - 1.6.0.9001 + 1.6.0.9002 diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 5b4a3fe6..a4bcef62 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -81,7 +81,7 @@ AMR (for R) - 1.6.0.9001 + 1.6.0.9002 diff --git a/docs/articles/index.html b/docs/articles/index.html index b3e78c3c..0607f762 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.6.0.9001 + 1.6.0.9002 diff --git a/docs/authors.html b/docs/authors.html index c181d6e3..ecefc12f 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -81,7 +81,7 @@ AMR (for R) - 1.6.0.9001 + 1.6.0.9002 diff --git a/docs/index.html b/docs/index.html index 15af9279..e6c0f4aa 100644 --- a/docs/index.html +++ b/docs/index.html @@ -42,7 +42,7 @@ AMR (for R) - 1.6.0.9001 + 1.6.0.9002 diff --git a/docs/news/index.html b/docs/news/index.html index d281a3ef..886187a9 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.6.0.9001 + 1.6.0.9002 @@ -236,9 +236,9 @@ Source: NEWS.md -
-

-AMR 1.6.0.9001 Unreleased +
+

+AMR 1.6.0.9002 Unreleased

@@ -270,6 +270,7 @@
  • first_isolate() can now take a vector of values for col_keyantibiotics and can have an episode length of Inf
  • +
  • Fixed an installation error on R-3.0
  • @@ -313,7 +314,7 @@ #> Filtering on oxazolidinones: value in column `LNZ` (linezolid) is either "R", "S" or "I"

  • 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:

    @@ -370,7 +371,7 @@
     
  • Plotting of MIC and disk diffusion values now support interpretation colouring if you supply the microorganism and antimicrobial agent
  • All colours were updated to colour-blind friendly versions for values R, S and I for all plot methods (also applies to tibble printing)
  • Interpretation of MIC and disk diffusion values to R/SI will now be translated if the system language is German, Dutch or Spanish (see translate)
  • -
  • Plotting is now possible with base R using plot() and with ggplot2 using ggplot() on any vector of MIC and disk diffusion values
  • +
  • Plotting is now possible with base R using plot() and with ggplot2 using ggplot() on any vector of MIC and disk diffusion values
  • Updated SNOMED codes to US Edition of SNOMED CT from 1 September 2020 and added the source to the help page of the microorganisms data set
  • diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index b6d1cea4..910f1564 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -12,7 +12,7 @@ articles: datasets: datasets.html resistance_predict: resistance_predict.html welcome_to_AMR: welcome_to_AMR.html -last_built: 2021-04-12T10:33Z +last_built: 2021-04-12T12:24Z urls: reference: https://msberends.github.io/AMR//reference article: https://msberends.github.io/AMR//articles diff --git a/docs/reference/index.html b/docs/reference/index.html index 1ff7fed1..1d3b900f 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.6.0.9001 + 1.6.0.9002 diff --git a/docs/survey.html b/docs/survey.html index 926df70d..c0da4272 100644 --- a/docs/survey.html +++ b/docs/survey.html @@ -81,7 +81,7 @@ AMR (for R) - 1.6.0.9001 + 1.6.0.9002 diff --git a/git_premaster.sh b/git_premaster.sh index 8bb72753..00373e82 100755 --- a/git_premaster.sh +++ b/git_premaster.sh @@ -125,6 +125,7 @@ echo "• Building package •" echo "••••••••••••••••••••" echo "• Building 'data-raw/AMR_latest.tar.gz'..." Rscript -e "x <- devtools::build(path = 'data-raw', vignettes = FALSE, manual = FALSE, binary = FALSE, quiet = TRUE)" +rm data-raw/AMR_latest.tar.gz mv data-raw/AMR_*.tar.gz data-raw/AMR_latest.tar.gz echo "• Installing..." Rscript -e "devtools::install(quiet = TRUE, dependencies = FALSE)"