mirror of
https://github.com/msberends/AMR.git
synced 2024-12-25 20:06:12 +01:00
website syntax update
This commit is contained in:
parent
714a048fa9
commit
e890360986
@ -1,5 +1,5 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 1.8.2.9132
|
Version: 1.8.2.9133
|
||||||
Date: 2023-02-17
|
Date: 2023-02-17
|
||||||
Title: Antimicrobial Resistance Data Analysis
|
Title: Antimicrobial Resistance Data Analysis
|
||||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||||
|
2
NEWS.md
2
NEWS.md
@ -1,4 +1,4 @@
|
|||||||
# AMR 1.8.2.9132
|
# AMR 1.8.2.9133
|
||||||
|
|
||||||
*(this beta version will eventually become v2.0! We're happy to reach a new major milestone soon!)*
|
*(this beta version will eventually become v2.0! We're happy to reach a new major milestone soon!)*
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
#' @param minimum the minimum allowed number of available (tested) isolates. Any isolate count lower than `minimum` will return `NA` with a warning. The default number of `30` isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see *Source*.
|
#' @param minimum the minimum allowed number of available (tested) isolates. Any isolate count lower than `minimum` will return `NA` with a warning. The default number of `30` isolates is advised by the Clinical and Laboratory Standards Institute (CLSI) as best practice, see *Source*.
|
||||||
#' @param combine_SI a [logical] to indicate whether all susceptibility should be determined by results of either S or I, instead of only S (defaults to `TRUE`)
|
#' @param combine_SI a [logical] to indicate whether all susceptibility should be determined by results of either S or I, instead of only S (defaults to `TRUE`)
|
||||||
#' @param sep a separating character for antibiotic columns in combination antibiograms
|
#' @param sep a separating character for antibiotic columns in combination antibiograms
|
||||||
|
#' @param info a [logical] to indicate info should be printed, defaults to `TRUE` only in interactive mode
|
||||||
#' @param object an [antibiogram()] object
|
#' @param object an [antibiogram()] object
|
||||||
#' @param ... when used in [print()]: arguments passed on to [knitr::kable()] (otherwise, has no use)
|
#' @param ... when used in [print()]: arguments passed on to [knitr::kable()] (otherwise, has no use)
|
||||||
#' @details This function returns a table with values between 0 and 100 for *susceptibility*, not resistance.
|
#' @details This function returns a table with values between 0 and 100 for *susceptibility*, not resistance.
|
||||||
@ -253,7 +254,8 @@ antibiogram <- function(x,
|
|||||||
language = get_AMR_locale(),
|
language = get_AMR_locale(),
|
||||||
minimum = 30,
|
minimum = 30,
|
||||||
combine_SI = TRUE,
|
combine_SI = TRUE,
|
||||||
sep = " + ") {
|
sep = " + ",
|
||||||
|
info = interactive()) {
|
||||||
meet_criteria(x, allow_class = "data.frame", contains_column_class = "sir")
|
meet_criteria(x, allow_class = "data.frame", contains_column_class = "sir")
|
||||||
meet_criteria(mo_transform, allow_class = "character", has_length = 1, is_in = c("name", "shortname", "gramstain", colnames(AMR::microorganisms)), allow_NULL = TRUE)
|
meet_criteria(mo_transform, allow_class = "character", has_length = 1, is_in = c("name", "shortname", "gramstain", colnames(AMR::microorganisms)), allow_NULL = TRUE)
|
||||||
meet_criteria(ab_transform, allow_class = "character", has_length = 1, is_in = colnames(AMR::antibiotics), allow_NULL = TRUE)
|
meet_criteria(ab_transform, allow_class = "character", has_length = 1, is_in = colnames(AMR::antibiotics), allow_NULL = TRUE)
|
||||||
@ -266,6 +268,7 @@ antibiogram <- function(x,
|
|||||||
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_positive_or_zero = TRUE, is_finite = TRUE)
|
meet_criteria(minimum, allow_class = c("numeric", "integer"), has_length = 1, is_positive_or_zero = TRUE, is_finite = TRUE)
|
||||||
meet_criteria(combine_SI, allow_class = "logical", has_length = 1)
|
meet_criteria(combine_SI, allow_class = "logical", has_length = 1)
|
||||||
meet_criteria(sep, allow_class = "character", has_length = 1)
|
meet_criteria(sep, allow_class = "character", has_length = 1)
|
||||||
|
meet_criteria(info, allow_class = "logical", has_length = 1)
|
||||||
|
|
||||||
# try to find columns based on type
|
# try to find columns based on type
|
||||||
if (is.null(col_mo)) {
|
if (is.null(col_mo)) {
|
||||||
@ -368,7 +371,9 @@ antibiogram <- function(x,
|
|||||||
out$numerator <- out$S
|
out$numerator <- out$S
|
||||||
}
|
}
|
||||||
if (any(out$total < minimum, na.rm = TRUE)) {
|
if (any(out$total < minimum, na.rm = TRUE)) {
|
||||||
message_("NOTE: ", sum(out$total < minimum, na.rm = TRUE), " combinations had less than `minimum = ", minimum, "` results and were ignored", add_fn = font_red)
|
if (isTRUE(info)) {
|
||||||
|
message_("NOTE: ", sum(out$total < minimum, na.rm = TRUE), " combinations had less than `minimum = ", minimum, "` results and were ignored", add_fn = font_red)
|
||||||
|
}
|
||||||
out <- out %pm>%
|
out <- out %pm>%
|
||||||
subset(total >= minimum)
|
subset(total >= minimum)
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,10 @@ template:
|
|||||||
# the green "success" colour of this bootstrap theme should be the same as the green in our logo
|
# the green "success" colour of this bootstrap theme should be the same as the green in our logo
|
||||||
success: "#128f76"
|
success: "#128f76"
|
||||||
link-color: "#128f76"
|
link-color: "#128f76"
|
||||||
|
light: "#128f76a6" # this is success with 60% alpha
|
||||||
|
# the template "info" is blue - this should be a green fitting our theme
|
||||||
|
info: "#60a799"
|
||||||
|
# make top bar a bit wider
|
||||||
navbar-padding-y: "0.5rem"
|
navbar-padding-y: "0.5rem"
|
||||||
opengraph:
|
opengraph:
|
||||||
twitter:
|
twitter:
|
||||||
|
@ -27,7 +27,8 @@ antibiogram(
|
|||||||
language = get_AMR_locale(),
|
language = get_AMR_locale(),
|
||||||
minimum = 30,
|
minimum = 30,
|
||||||
combine_SI = TRUE,
|
combine_SI = TRUE,
|
||||||
sep = " + "
|
sep = " + ",
|
||||||
|
info = interactive()
|
||||||
)
|
)
|
||||||
|
|
||||||
\method{plot}{antibiogram}(x, ...)
|
\method{plot}{antibiogram}(x, ...)
|
||||||
@ -63,6 +64,8 @@ antibiogram(
|
|||||||
|
|
||||||
\item{sep}{a separating character for antibiotic columns in combination antibiograms}
|
\item{sep}{a separating character for antibiotic columns in combination antibiograms}
|
||||||
|
|
||||||
|
\item{info}{a \link{logical} to indicate info should be printed, defaults to \code{TRUE} only in interactive mode}
|
||||||
|
|
||||||
\item{...}{when used in \code{\link[=print]{print()}}: arguments passed on to \code{\link[knitr:kable]{knitr::kable()}} (otherwise, has no use)}
|
\item{...}{when used in \code{\link[=print]{print()}}: arguments passed on to \code{\link[knitr:kable]{knitr::kable()}} (otherwise, has no use)}
|
||||||
|
|
||||||
\item{object}{an \code{\link[=antibiogram]{antibiogram()}} object}
|
\item{object}{an \code{\link[=antibiogram]{antibiogram()}} object}
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
/* marked words for after using the search box */
|
/* marked words for after using the search box */
|
||||||
mark, .mark {
|
mark, .mark {
|
||||||
background: rgba(17, 143, 118, 0.25) !important;
|
background: var(--bs-light) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* smaller tables */
|
/* smaller tables */
|
||||||
@ -82,17 +82,18 @@ pre .fu, .fu {
|
|||||||
}
|
}
|
||||||
pre .st, .st {
|
pre .st, .st {
|
||||||
/* strings, regular text */
|
/* strings, regular text */
|
||||||
color: #60a799 !important;
|
color: var(--bs-info) !important;
|
||||||
}
|
}
|
||||||
pre .co, .co {
|
pre .co, .co {
|
||||||
/* comments */
|
/* comments */
|
||||||
color: #999999 !important;
|
color: var(--bs-success) !important;
|
||||||
font-style: italic !important;
|
font-style: italic !important;
|
||||||
}
|
}
|
||||||
pre code .r-out,
|
pre code .r-out,
|
||||||
pre code .r-msg {
|
pre code .r-msg {
|
||||||
/* output of functions */
|
/* output of functions */
|
||||||
color: #555555 !important;
|
color: var(--bs-gray-600) !important;
|
||||||
|
font-style: normal !important;
|
||||||
}
|
}
|
||||||
code a[href],
|
code a[href],
|
||||||
a[href] code,
|
a[href] code,
|
||||||
|
Loading…
Reference in New Issue
Block a user