1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-10 13:01:58 +02:00
This commit is contained in:
2022-08-28 21:13:26 +02:00
parent 1e4eaf23f2
commit 2ed5f13880
6 changed files with 25 additions and 14 deletions

View File

@ -457,7 +457,11 @@ ab_validate <- function(x, property, ...) {
if (!all(x %in% AB_lookup[, property, drop = TRUE])) {
x <- as.ab(x, ...)
x <- AB_lookup[match(x, AB_lookup$ab), property, drop = TRUE]
if (all(is.na(x)) && is.list(AB_lookup[, property, drop = TRUE])) {
x <- rep(NA_character_, length(x))
} else {
x <- AB_lookup[match(x, AB_lookup$ab), property, drop = TRUE]
}
}
}