1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 22:41:52 +02:00

new tibble export

This commit is contained in:
2022-08-27 20:49:37 +02:00
parent 164886f50b
commit 303d61b473
115 changed files with 836 additions and 996 deletions

13
R/mic.R
View File

@ -120,9 +120,16 @@ valid_mic_levels <- c(c(t(vapply(FUN.VALUE = character(9), ops,
#' # plot MIC values, see ?plot
#' plot(mic_data)
#' plot(mic_data, mo = "E. coli", ab = "cipro")
#' autoplot(mic_data, mo = "E. coli", ab = "cipro")
#' autoplot(mic_data, mo = "E. coli", ab = "cipro", language = "nl") # Dutch
#' autoplot(mic_data, mo = "E. coli", ab = "cipro", language = "uk") # Ukrainian
#'
#' if (require("ggplot2")) {
#' autoplot(mic_data, mo = "E. coli", ab = "cipro")
#' }
#' if (require("ggplot2")) {
#' autoplot(mic_data, mo = "E. coli", ab = "cipro", language = "nl") # Dutch
#' }
#' if (require("ggplot2")) {
#' autoplot(mic_data, mo = "E. coli", ab = "cipro", language = "uk") # Ukrainian
#' }
as.mic <- function(x, na.rm = FALSE) {
meet_criteria(x, allow_class = c("mic", "character", "numeric", "integer", "factor"), allow_NA = TRUE)
meet_criteria(na.rm, allow_class = "logical", has_length = 1)