plot.mic_validation | R Documentation |
Plot MIC validation results
## S3 method for class 'mic_validation'
plot(
x,
match_axes = TRUE,
add_missing_dilutions = TRUE,
facet_wrap_ncol = NULL,
facet_wrap_nrow = NULL,
...
)
x |
object generated using compare_mic |
match_axes |
Same x and y axis |
add_missing_dilutions |
Axes will include dilutions that are not |
facet_wrap_ncol |
Facet wrap into n columns by antimicrobial (optional, only available when more than one antimicrobial in validation) |
facet_wrap_nrow |
Facet wrap into n rows by antimicrobial (optional, only available when more than one antimicrobial in validation) represented in the data, based on a series of dilutions generated using mic_range(). |
... |
additional arguments |
ggplot object
gold_standard <- c("<0.25", "8", "64", ">64")
test <- c("<0.25", "2", "16", "64")
val <- compare_mic(gold_standard, test)
plot(val)
# works with validation that includes categorical agreement
# categorical agreement is ignored
ab <- c("AMK", "AMK", "AMK", "AMK")
mo <- c("B_ESCHR_COLI", "B_ESCHR_COLI", "B_ESCHR_COLI", "B_ESCHR_COLI")
val <- compare_mic(gold_standard, test, ab, mo)
plot(val)
# if the validation contains multiple antibiotics, i.e.,
ab <- c("CIP", "CIP", "AMK", "AMK")
val <- compare_mic(gold_standard, test, ab, mo)
# the following will plot all antibiotics in a single plot (pooled results)
plot(val)
# use the faceting arguments to split the plot by antibiotic
plot(val, facet_wrap_ncol = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.