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

fix documentation

This commit is contained in:
2023-03-16 08:55:37 +01:00
parent dd7cc86485
commit c28cfa3a77
11 changed files with 27 additions and 16 deletions

View File

@ -670,10 +670,15 @@ create_eucast_ab_documentation <- function() {
atcs <- ab_atc(ab, only_first = TRUE)
# only keep ABx with an ATC code:
ab <- ab[!is.na(atcs)]
atcs <- atcs[!is.na(atcs)]
# sort all vectors on name:
ab_names <- ab_name(ab, language = NULL, tolower = TRUE)
ab <- ab[order(ab_names)]
atcs <- atcs[order(ab_names)]
ab_names <- ab_names[order(ab_names)]
atc_txt <- paste0("[", atcs[!is.na(atcs)], "](", ab_url(ab), ")")
# create the text:
atc_txt <- paste0("[", atcs, "](", ab_url(ab), ")")
out <- paste0(ab_names, " (`", ab, "`, ", atc_txt, ")", collapse = ", ")
substr(out, 1, 1) <- toupper(substr(out, 1, 1))
out