(v0.7.1.9072) key_antibiotics() for foreign systems

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2019-09-12 15:08:53 +02:00
1 parent b5d2a08401
commit cd178ee569
28 files changed
+1640 -119

No files matched your search

+4
View File
@@ -145,6 +145,10 @@ age_groups <- function(x, split_at = c(12, 25, 55, 75), na.rm = FALSE) {
if (!is.numeric(x)) {
stop("`x` and must be numeric, not a ", paste0(class(x), collapse = "/"), ".")
}
if (any(x < 0, na.rm = TRUE)) {
x[x < 0] <- NA
warning("NAs introduced for ages below 0.")
}
if (is.character(split_at)) {
split_at <- split_at[1L]
if (split_at %like% "^(child|kid|junior)") {