1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 01:22:25 +02:00

website update

This commit is contained in:
2019-05-23 19:39:07 +02:00
parent 4bf6a06935
commit 7e0e171512
7 changed files with 49 additions and 51 deletions

3
R/ab.R
View File

@ -31,9 +31,6 @@
#' @details All entries in the \code{\link{antibiotics}} data set have three different identifiers: a human readable EARS-Net code (column \code{ab}, used by ECDC and WHONET), an ATC code (column \code{atc}, used by WHO), and a CID code (column \code{cid}, Compound ID, used by PubChem). The data set contains more than 5,000 official brand names from many different countries, as found in PubChem.
#'
#' Use the \code{\link{ab_property}} functions to get properties based on the returned antibiotic ID, see Examples.
#'
#' In the ATC classification system, the active substances are classified in a hierarchy with five different levels. The system has fourteen main anatomical/pharmacological groups or 1st levels. Each ATC main group is divided into 2nd levels which could be either pharmacological or therapeutic groups. The 3rd and 4th levels are chemical, pharmacological or therapeutic subgroups and the 5th level is the chemical substance. The 2nd, 3rd and 4th levels are often used to identify pharmacological subgroups when that is considered more appropriate than therapeutic or chemical subgroups.
#' Source: \url{https://www.whocc.no/atc/structure_and_principles/}
#' @section Source:
#' World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology: \url{https://www.whocc.no/atc_ddd_index/}
#'

View File

@ -639,13 +639,13 @@ format_header <- function(x, markdown = FALSE, decimal.mark = ".", big.mark = ",
# class and mode
if (is.null(header$columns)) {
if (markdown == TRUE) {
header$class <- paste0("`", header$class, "`")
}
# if (markdown == TRUE) {
# header$class <- paste0("`", header$class, "`")
# }
if (!header$mode %in% header$class) {
if (markdown == TRUE) {
header$mode <- paste0("`", header$mode, "`")
}
# if (markdown == TRUE) {
# header$mode <- paste0("`", header$mode, "`")
# }
header$class <- header$class %>% rev() %>% paste(collapse = " > ") %>% paste0(silver(paste0(" (", header$mode, ")")))
} else {
header$class <- header$class %>% rev() %>% paste(collapse = " > ")
@ -654,9 +654,9 @@ format_header <- function(x, markdown = FALSE, decimal.mark = ".", big.mark = ",
}
# levels
if (!is.null(header$levels)) {
if (markdown == TRUE) {
header$levels <- paste0("`", header$levels, "`")
}
# if (markdown == TRUE) {
# header$levels <- paste0("`", header$levels, "`")
# }
if (header$ordered == TRUE) {
levels_text <- paste0(header$levels, collapse = " < ")
} else {

View File

@ -88,7 +88,7 @@ mdro <- function(x,
if (is.null(col_mo) & guideline$code == "tb") {
message(blue("NOTE: No column found as input for `col_mo`,",
bold("assuming all records contain",
italic("Mycobacterium tuberculosis."))))
italic("Mycobacterium tuberculosis.\n"))))
x$mo <- AMR::as.mo("Mycobacterium tuberculosis")
col_mo <- "mo"
}

View File

@ -219,7 +219,7 @@ get_column_abx <- function(x,
if (!all(soft_dependencies %in% names(x))) {
# missing a soft dependency may lower the reliability
missing <- soft_dependencies[!soft_dependencies %in% names(x)]
missing <- paste0("`", missing, "` (", ab_name(missing, tolower = TRUE), ")")
missing <- paste0(missing, " (", ab_name(missing, tolower = TRUE), ")")
warning('Reliability might be improved if these antimicrobial results would be available too: ', paste(missing, collapse = ", "),
immediate. = TRUE,
call. = FALSE)
@ -229,7 +229,7 @@ get_column_abx <- function(x,
}
generate_warning_abs_missing <- function(missing, any = FALSE) {
missing <- paste0("`", missing, "` (", ab_name(missing, tolower = TRUE), ")")
missing <- paste0(missing, " (", ab_name(missing, tolower = TRUE), ")")
if (any == TRUE) {
any_txt <- c(" any of", "is")
} else {