Skip to contents

With add_custom_antimicrobials() you can add your own manual antimicrobial codes to the AMR package.

Usage

add_custom_antimicrobials(x)

clear_custom_antimicrobials()

Arguments

x

a data.frame resembling the antibiotics data set, at least containing columns "ab" and "name"

Details

Due to how R works, the add_custom_antimicrobials() function has to be run in every R session - added antimicrobials are not stored between sessions and are thus lost when R is exited. It is possible to save the antimicrobial additions to your .Rprofile file to circumvent this, although this requires to load the AMR package at every start-up:

# Open .Rprofile file
utils::file.edit("~/.Rprofile")

# Add custom antibiotic codes:
library(AMR)
add_custom_antimicrobials(
  data.frame(ab = "TEST",
             name = "Test Antibiotic",
             group = "Test Group")
)

Use clear_custom_antimicrobials() to clear the previously added antimicrobials.

Examples