complexes

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2022-11-17 15:23:29 +01:00
1 parent f6862a139d
commit 05d536ebb7
7 files changed
+23 -6

No files matched your search

+5 -1
View File
@@ -180,6 +180,10 @@ as.mo <- function(x,
x <- replace_ignore_pattern(x, ignore_pattern)
x_lower <- tolower(x)
if (any(trimws2(x_lower) %like_case% "complex$", na.rm = TRUE)) {
warning_("in `as.mo()`: translation of complexes is not supported at the moment - the input text 'complex' was ignored.", call = FALSE)
}
# WHONET: xxx = no growth
x[x_lower %in% c("", "xxx", "na", "nan")] <- NA_character_
@@ -521,7 +525,7 @@ mo_cleaning_regex <- function() {
"|",
"([({]|\\[).+([})]|\\])",
"|",
"(^| )(e?spp|e?ssp|e?ss|e?sp|e?subsp|sube?species|biovar|biotype|serovar|e?species)[.]*( |$))"
"(^| )(e?spp|e?ssp|e?ss|e?sp|e?subsp|sube?species|biovar|biotype|serovar|serogr.?up|e?species|complex)[.]*( |$))"
)
}