% Generated by roxygen2: do not edit by hand % Please edit documentation in R/add_custom_microorganisms.R \name{add_custom_microorganisms} \alias{add_custom_microorganisms} \alias{clear_custom_microorganisms} \title{Add Custom Microorganisms to This Package} \usage{ add_custom_microorganisms(x) clear_custom_microorganisms() } \arguments{ \item{x}{a \link{data.frame} resembling the \link{microorganisms} data set, at least containing columns "mo", "genus" and "species"} } \description{ With \code{\link[=add_custom_microorganisms]{add_custom_microorganisms()}} you can add your own custom antimicrobial drug codes to the \code{AMR} package. } \details{ This function will fill in missing taxonomy for you, if specific taxonomic columns are missing, see \emph{Examples}. \strong{Important:} Due to how \R works, the \code{\link[=add_custom_microorganisms]{add_custom_microorganisms()}} function has to be run in every \R session - added microorganisms are not stored between sessions and are thus lost when \R is exited. There are two ways to automate this process: \strong{Method 1:} Save the microorganisms to a local or remote file (can even be the internet). To use this method: \enumerate{ \item Create a data set in the structure of the \link{microorganisms} data set (containing at the very least columns "ab" and "name") and save it with \code{\link[=saveRDS]{saveRDS()}} to a location of choice, e.g. \code{"~/my_custom_mo.rds"}, or any remote location. \item Set the file location to the \code{AMR_custom_mo} \R option: \code{options(AMR_custom_mo = "~/my_custom_mo.rds")}. This can even be a remote file location, such as an https URL. Since options are not saved between \R sessions, it is best to save this option to the \code{.Rprofile} file so that it will loaded on start-up of \R. To do this, open the \code{.Rprofile} file using e.g. \code{utils::file.edit("~/.Rprofile")}, add this text and save the file: \if{html}{\out{