mirror of
https://github.com/msberends/AMR.git
synced 2026-11-29 00:06:12 +01:00
1.2 KiB
1.2 KiB
Check Availability of Columns
Easy check for data availability of all columns in a data set. This
makes it easy to get an idea of which antimicrobial combinations can be
used for calculation with e.g.
susceptibility()
and
resistance().
Usage
availability(tbl, width = NULL)
Arguments
-
tbl:
A data.frame or list.
-
width:
Number of characters to present the visual availability - the default is filling the width of the console.
Value
data.frame with column names
of tbl as row names
Details
The function returns a
data.frame with columns
"resistant" and "visual_resistance". The values in that columns are
calculated with
resistance().
Examples
availability(example_isolates)
# \donttest{
if (require("dplyr")) {
example_isolates %>%
filter(mo == as.mo("Escherichia coli")) %>%
select_if(is.sir) %>%
availability()
}
# }