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()
.
availability(tbl, width = NULL)
tbl | a |
---|---|
width | number of characters to present the visual availability, defaults to filling the width of the console |
data.frame
with column names of tbl
as row names
The function returns a data.frame
with columns "resistant"
and "visual_resistance"
. The values in that columns are calculated with resistance()
.
The lifecycle of this function is stable. In a stable function, we are largely happy with the unlying code, and major changes are unlikely. This means that the unlying code will generally evolve by adding new arguments; we will avoid removing arguments or changing the meaning of existing arguments.
If the unlying code needs breaking changes, they will occur gradually. To begin with, the function or argument will be deprecated; it will continue to work but will emit an message informing you of the change. Next, typically after at least one newly released version on CRAN, the message will be transformed to an error.
On our website https://msberends.gitlab.io/AMR you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions (which reads a lot easier than here in R) and an example analysis using WHONET data.
availability(example_isolates) library(dplyr) example_isolates %>% availability() example_isolates %>% select_if(is.rsi) %>% availability() example_isolates %>% filter(mo == as.mo("E. coli")) %>% select_if(is.rsi) %>% availability()