1
0
mirror of https://github.com/msberends/AMR.git synced 2026-03-07 17:31:34 +01:00

(v3.0.1.9026) fix ab_group(NA)

This commit is contained in:
2026-03-06 12:41:27 +01:00
parent 4e3ea95fbd
commit 60e8f2bae6
8 changed files with 41 additions and 6 deletions

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]