1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 16:42:10 +02:00

(v1.5.0.9040) removal of isolate_identifier

This commit is contained in:
2021-03-08 09:44:17 +01:00
parent a7c9b4c295
commit 8d6ceb6a15
30 changed files with 133 additions and 423 deletions

View File

@ -100,13 +100,13 @@
#' plot(mic_data)
#' plot(mic_data, mo = "E. coli", ab = "cipro")
as.mic <- function(x, na.rm = FALSE) {
meet_criteria(x, allow_class = c("mic", "character", "numeric", "integer"), allow_NA = TRUE)
meet_criteria(x, allow_class = c("mic", "character", "numeric", "integer", "factor"), allow_NA = TRUE)
meet_criteria(na.rm, allow_class = "logical", has_length = 1)
if (is.mic(x)) {
x
} else {
x <- unlist(x)
x <- as.character(unlist(x))
if (na.rm == TRUE) {
x <- x[!is.na(x)]
}