diff --git a/.github/prehooks/pre-commit b/.github/prehooks/pre-commit index 6814b90f..76f833ce 100755 --- a/.github/prehooks/pre-commit +++ b/.github/prehooks/pre-commit @@ -33,7 +33,7 @@ echo "Running pre-commit hook..." # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if command -v Rscript > /dev/null; then - if [ "$(Rscript -e 'cat(all(c('"'pkgload'"', '"'devtools'"', '"'dplyr'"', '"'styler'"') %in% rownames(installed.packages())))')" = "TRUE" ]; then + if [ "$(Rscript -e 'cat(all(c('"'pkgload'"', '"'devtools'"', '"'dplyr'"') %in% rownames(installed.packages())))')" = "TRUE" ]; then Rscript -e "source('data-raw/_pre_commit_hook.R')" currentpkg=`Rscript -e "cat(pkgload::pkg_name())"` echo "-> Adding all files in 'data-raw' to this commit" diff --git a/DESCRIPTION b/DESCRIPTION index a909b844..fcd410fc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 1.8.2.9077 +Version: 1.8.2.9078 Date: 2023-01-05 Title: Antimicrobial Resistance Data Analysis Description: Functions to simplify and standardise antimicrobial resistance (AMR) diff --git a/NEWS.md b/NEWS.md index 58d290bc..24ebfaa2 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# 1.8.2.9077 +# AMR 1.8.2.9078 *(this beta version will eventually become v2.0! We're happy to reach a new major milestone soon!)* diff --git a/R/sysdata.rda b/R/sysdata.rda index 0788095e..e7d3d6f9 100644 Binary files a/R/sysdata.rda and b/R/sysdata.rda differ diff --git a/data-raw/_pre_commit_hook.R b/data-raw/_pre_commit_hook.R index be217489..de2e808d 100644 --- a/data-raw/_pre_commit_hook.R +++ b/data-raw/_pre_commit_hook.R @@ -486,14 +486,16 @@ suppressMessages(devtools::document(quiet = TRUE)) # Style pkg --------------------------------------------------------------- -# if (interactive()) { -# # only when sourcing this file ourselves -# usethis::ui_info("Styling package") -# styler::style_pkg( -# style = styler::tidyverse_style, -# filetype = c("R", "Rmd") -# ) -# } +if (!"styler" %in% rownames(utils::installed.packages())) { + message("Package 'styler' not installed!") +} else if (interactive()) { + # # only when sourcing this file ourselves + # usethis::ui_info("Styling package") + # styler::style_pkg( + # style = styler::tidyverse_style, + # filetype = c("R", "Rmd") + # ) +} # Finished ---------------------------------------------------------------- diff --git a/man/ab_property.Rd b/man/ab_property.Rd index a94a36f8..7a49e2b6 100644 --- a/man/ab_property.Rd +++ b/man/ab_property.Rd @@ -62,7 +62,7 @@ set_ab_names( \item{tolower}{a \link{logical} to indicate whether the first \link{character} of every output should be transformed to a lower case \link{character}. This will lead to e.g. "polymyxin B" and not "polymyxin b".} -\item{...}{in case of \code{\link[=set_ab_names]{set_ab_names()}} and \code{data} is a \link{data.frame}: variables to select (supports tidy selection such as \code{column1:column4}), otherwise other arguments passed on to \code{\link[=as.ab]{as.ab()}}} +\item{...}{in case of \code{\link[=set_ab_names]{set_ab_names()}} and \code{data} is a \link{data.frame}: columns to select (supports tidy selection such as \code{column1:column4}), otherwise other arguments passed on to \code{\link[=as.ab]{as.ab()}}} \item{only_first}{a \link{logical} to indicate whether only the first ATC code must be returned, with giving preference to J0-codes (i.e., the antimicrobial drug group)} diff --git a/man/custom_eucast_rules.Rd b/man/custom_eucast_rules.Rd index 21ce6c13..55d42503 100644 --- a/man/custom_eucast_rules.Rd +++ b/man/custom_eucast_rules.Rd @@ -60,7 +60,7 @@ eucast_rules(df, rules = "custom", custom_rules = x, info = FALSE) \subsection{Using taxonomic properties in rules}{ -There is one exception in variables used for the rules: all column names of the \link{microorganisms} data set can also be used, but do not have to exist in the data set. These column names are: "mo", "fullname", "status", "kingdom", "phylum", "class", "order", "family", "genus", "species", "subspecies", "rank", "ref", "source", "lpsn", "lpsn_parent", "lpsn_renamed_to", "gbif", "gbif_parent", "gbif_renamed_to", "prevalence" and "snomed". Thus, this next example will work as well, despite the fact that the \code{df} data set does not contain a column \code{genus}: +There is one exception in columns used for the rules: all column names of the \link{microorganisms} data set can also be used, but do not have to exist in the data set. These column names are: "mo", "fullname", "status", "kingdom", "phylum", "class", "order", "family", "genus", "species", "subspecies", "rank", "ref", "source", "lpsn", "lpsn_parent", "lpsn_renamed_to", "gbif", "gbif_parent", "gbif_renamed_to", "prevalence" and "snomed". Thus, this next example will work as well, despite the fact that the \code{df} data set does not contain a column \code{genus}: \if{html}{\out{