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)

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()

Maturing lifecycle


The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. Since this function needs wider usage and more extensive testing, you are very welcome to suggest changes at our repository or write us an email (see section 'Contact Us').

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()))