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

Fix some WHONET codes

This commit is contained in:
2023-04-14 11:12:26 +02:00
parent 549790c2a6
commit 147f9112e9
21 changed files with 109 additions and 60 deletions

View File

@ -644,10 +644,13 @@ format_included_data_number <- function(data) {
rounder <- -3 # round on thousands
} else if (n > 1000) {
rounder <- -2 # round on hundreds
} else if (n < 50) {
# do not round
rounder <- 0
} else {
rounder <- -1 # round on tens
}
paste0("~", format(round(n, rounder), decimal.mark = ".", big.mark = " "))
paste0(ifelse(rounder == 0, "", "~"), format(round(n, rounder), decimal.mark = ".", big.mark = " "))
}
# for eucast_rules() and mdro(), creates markdown output with URLs and names