mirror of
https://github.com/msberends/AMR.git
synced 2026-10-01 04:13:33 +02:00
coercion fixes
This commit is contained in:
1 parent
3fc39198d0
commit
f203928f7e
5 files changed
+7
-7
No files matched your search
@@ -440,7 +440,7 @@ as.mo <- function(x,
|
||||
|
||||
# All unknowns ----
|
||||
out[is.na(out) & !is.na(x)] <- "UNKNOWN"
|
||||
AMR_env$mo_failures <- unique(x[out == "UNKNOWN" & x != "UNKNOWN" & !is.na(x)])
|
||||
AMR_env$mo_failures <- unique(x[out == "UNKNOWN" & !x %in% c("UNKNOWN", "con") & !x %like_case% "^[(]unknown [a-z]+[)]$" & !is.na(x)])
|
||||
if (length(AMR_env$mo_failures) > 0) {
|
||||
warning_("The following input could not be coerced and was returned as \"UNKNOWN\": ", vector_and(AMR_env$mo_failures, quotes = TRUE), ".\nYou can retrieve this list with `mo_failures()`.")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user