(v3.0.1.9026) fix ab_group(NA)

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2026-03-06 12:41:27 +01:00
1 parent 4e3ea95fbd
commit 60e8f2bae6
8 files changed
+41 -6

No files matched your search

+3
View File
@@ -172,6 +172,9 @@ ab_group <- function(x, language = get_AMR_locale(), all_groups = FALSE, ...) {
grps <- ab_validate(x = x, property = "group", ...)
for (i in seq_along(grps)) {
if (is.null(grps[[i]]) || all(is.na(grps[[i]]))) {
grps[[i]] <- NA_character_
}
if (all_groups == FALSE) {
# take the first match based on ABX_PRIORITY_LIST
grps[[i]] <- grps[[i]][1]