This function will paste the microorganism code with all antimicrobial results into one string for each row in a data set. This is useful to compare isolates, e.g. between institutions or regions, when there is no genotyping available.

isolate_identifier(x, col_mo = NULL, cols_ab = NULL)

# S3 method for isolate_identifier
all.equal(target, current, ignore_empty_results = TRUE, ...)

Arguments

x

data with antibiotic columns, such as amox, AMX and AMC

col_mo

column name of the IDs of the microorganisms (see as.mo()), defaults to the first column of class mo. Values will be coerced using as.mo().

cols_ab

a character vector of column names of x, or (a combination with) an antibiotic selector function, such as carbapenems() and aminoglycosides()

...

column name of an antibiotic, see section Antibiotics below

Experimental Lifecycle


The lifecycle of this function is experimental. An experimental function is in early stages of development. The unlying code might be changing frequently. Experimental functions might be removed without deprecation, so you are generally best off waiting until a function is more mature before you use it in production code. Experimental functions are only available in development versions of this AMR package and will thus not be included in releases that are submitted to CRAN, since such functions have not yet matured enough.

Read more on Our Website!

On our website https://msberends.github.io/AMR/ you can find a comprehensive tutorial about how to conduct AMR analysis, the complete documentation of all functions and an example analysis using WHONET data. As we would like to better understand the backgrounds and needs of our users, please participate in our survey!

Examples

# automatic selection of microorganism and antibiotics (i.e., all <rsi> columns, see ?as.rsi)
x <- isolate_identifier(example_isolates)

# ignore microorganism codes, only use antimicrobial results
x <- isolate_identifier(example_isolates, col_mo = FALSE, cols_ab = c("AMX", "TZP", "GEN", "TOB"))

# select antibiotics from certain antibiotic classes
x <- isolate_identifier(example_isolates, cols_ab = c(carbapenems(), aminoglycosides()))