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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user