1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 18:01:50 +02:00

(v1.4.0.9021) more robust class setting

This commit is contained in:
2020-11-16 16:57:55 +01:00
parent 05fb213a7c
commit deefce9520
29 changed files with 98 additions and 85 deletions

View File

@ -39,7 +39,6 @@
#' @examples
#' \donttest{
#' # transform existing disk zones to the `disk` class
#' library(dplyr)
#' df <- data.frame(microorganism = "E. coli",
#' AMP = 20,
#' CIP = 14,
@ -107,8 +106,8 @@ as.disk <- function(x, na.rm = FALSE) {
list_missing, call = FALSE)
}
}
structure(as.integer(x),
class = c("disk", "integer"))
set_clean_class(as.integer(x),
new_class = c("disk", "integer"))
}
all_valid_disks <- function(x) {