mirror of
https://github.com/msberends/AMR.git
synced 2024-12-24 18:46:14 +01:00
website syntax update
This commit is contained in:
parent
714a048fa9
commit
e890360986
@ -1,5 +1,5 @@
|
||||
Package: AMR
|
||||
Version: 1.8.2.9132
|
||||
Version: 1.8.2.9133
|
||||
Date: 2023-02-17
|
||||
Title: Antimicrobial Resistance Data Analysis
|
||||
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!)*
|
||||
|
||||
|
@ -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 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 info a [logical] to indicate info should be printed, defaults to `TRUE` only in interactive mode
|
||||
#' @param object an [antibiogram()] object
|
||||
#' @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.
|
||||
@ -253,7 +254,8 @@ antibiogram <- function(x,
|
||||
language = get_AMR_locale(),
|
||||
minimum = 30,
|
||||
combine_SI = TRUE,
|
||||
sep = " + ") {
|
||||
sep = " + ",
|
||||
info = interactive()) {
|
||||
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(ab_transform, allow_class = "character", has_length = 1, is_in = colnames(AMR::antibiotics), allow_NULL = TRUE)
|
||||
@ -266,7 +268,8 @@ antibiogram <- function(x,
|
||||
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(sep, allow_class = "character", has_length = 1)
|
||||
|
||||
meet_criteria(info, allow_class = "logical", has_length = 1)
|
||||
|
||||
# try to find columns based on type
|
||||
if (is.null(col_mo)) {
|
||||
col_mo <- search_type_in_df(x = x, type = "mo", info = interactive())
|
||||
@ -368,11 +371,13 @@ antibiogram <- function(x,
|
||||
out$numerator <- out$S
|
||||
}
|
||||
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>%
|
||||
subset(total >= minimum)
|
||||
}
|
||||
|
||||
|
||||
# regroup for summarising
|
||||
if (isTRUE(has_syndromic_group)) {
|
||||
colnames(out)[1] <- "syndromic_group"
|
||||
|
@ -41,6 +41,10 @@ template:
|
||||
# the green "success" colour of this bootstrap theme should be the same as the green in our logo
|
||||
success: "#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"
|
||||
opengraph:
|
||||
twitter:
|
||||
|
@ -27,7 +27,8 @@ antibiogram(
|
||||
language = get_AMR_locale(),
|
||||
minimum = 30,
|
||||
combine_SI = TRUE,
|
||||
sep = " + "
|
||||
sep = " + ",
|
||||
info = interactive()
|
||||
)
|
||||
|
||||
\method{plot}{antibiogram}(x, ...)
|
||||
@ -63,6 +64,8 @@ antibiogram(
|
||||
|
||||
\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{object}{an \code{\link[=antibiogram]{antibiogram()}} object}
|
||||
|
@ -51,7 +51,7 @@
|
||||
|
||||
/* marked words for after using the search box */
|
||||
mark, .mark {
|
||||
background: rgba(17, 143, 118, 0.25) !important;
|
||||
background: var(--bs-light) !important;
|
||||
}
|
||||
|
||||
/* smaller tables */
|
||||
@ -82,17 +82,18 @@ pre .fu, .fu {
|
||||
}
|
||||
pre .st, .st {
|
||||
/* strings, regular text */
|
||||
color: #60a799 !important;
|
||||
color: var(--bs-info) !important;
|
||||
}
|
||||
pre .co, .co {
|
||||
/* comments */
|
||||
color: #999999 !important;
|
||||
color: var(--bs-success) !important;
|
||||
font-style: italic !important;
|
||||
}
|
||||
pre code .r-out,
|
||||
pre code .r-msg {
|
||||
/* output of functions */
|
||||
color: #555555 !important;
|
||||
color: var(--bs-gray-600) !important;
|
||||
font-style: normal !important;
|
||||
}
|
||||
code a[href],
|
||||
a[href] code,
|
||||
|
Loading…
Reference in New Issue
Block a user