mirror of
https://github.com/msberends/AMR.git
synced 2025-07-12 01:42:08 +02:00
documentation, file permissions
This commit is contained in:
0
man/AMR-deprecated.Rd
Normal file → Executable file
0
man/AMR-deprecated.Rd
Normal file → Executable file
17
man/AMR-options.Rd
Normal file
17
man/AMR-options.Rd
Normal file
@ -0,0 +1,17 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/options.R
|
||||
\name{AMR-options}
|
||||
\alias{AMR-options}
|
||||
\title{Options for the AMR package}
|
||||
\description{
|
||||
This is an overview of the package-specific \code{\link[=options]{options()}} you can set in the \code{AMR} package.
|
||||
}
|
||||
\section{Options}{
|
||||
|
||||
\itemize{
|
||||
\item \code{AMR_custom_ab}: allows to use custom antimicrobial drugs with this package. This is explained in \code{\link[=add_custom_antimicrobials]{add_custom_antimicrobials()}}.
|
||||
\item \code{AMR_custom_mo}: allows to use custom microorganisms with this package. This is explained in \code{\link[=add_custom_microorganisms]{add_custom_microorganisms()}}.
|
||||
}
|
||||
}
|
||||
|
||||
\keyword{internal}
|
0
man/AMR.Rd
Normal file → Executable file
0
man/AMR.Rd
Normal file → Executable file
0
man/WHOCC.Rd
Normal file → Executable file
0
man/WHOCC.Rd
Normal file → Executable file
0
man/WHONET.Rd
Normal file → Executable file
0
man/WHONET.Rd
Normal file → Executable file
0
man/ab_from_text.Rd
Normal file → Executable file
0
man/ab_from_text.Rd
Normal file → Executable file
0
man/ab_property.Rd
Normal file → Executable file
0
man/ab_property.Rd
Normal file → Executable file
0
man/add_custom_antimicrobials.Rd
Normal file → Executable file
0
man/add_custom_antimicrobials.Rd
Normal file → Executable file
20
man/add_custom_microorganisms.Rd
Normal file → Executable file
20
man/add_custom_microorganisms.Rd
Normal file → Executable file
@ -22,10 +22,10 @@ This function will fill in missing taxonomy for you, if specific taxonomic colum
|
||||
|
||||
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:
|
||||
\strong{Method 1:} Using the , which is the preferred method. To use this method:
|
||||
\enumerate{
|
||||
\item Create a data set in the structure of the \link{microorganisms} data set (containing at the very least column "genus") 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:
|
||||
\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 be 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{<div class="sourceCode r">}}\preformatted{# Add custom microorganism codes:
|
||||
options(AMR_custom_mo = "~/my_custom_mo.rds")
|
||||
@ -34,14 +34,13 @@ options(AMR_custom_mo = "~/my_custom_mo.rds")
|
||||
Upon package load, this file will be loaded and run through the \code{\link[=add_custom_microorganisms]{add_custom_microorganisms()}} function.
|
||||
}
|
||||
|
||||
\strong{Method 2:} Save the microorganism directly to your \code{.Rprofile} file. An important downside is that this requires to load the \code{AMR} package at every start-up. To use this method:
|
||||
\strong{Method 2:} Loading the microorganism directly from your \code{.Rprofile} file. An important downside is that this requires the \code{AMR} package to be installed or else this method will fail. To use this method:
|
||||
\enumerate{
|
||||
\item Edit the \code{.Rprofile} file using e.g. \code{utils::file.edit("~/.Rprofile")}.
|
||||
\item Add a text like below and save the file:
|
||||
|
||||
\if{html}{\out{<div class="sourceCode r">}}\preformatted{ # Add custom antibiotic drug codes:
|
||||
library(AMR)
|
||||
add_custom_microorganisms(
|
||||
AMR::add_custom_microorganisms(
|
||||
data.frame(genus = "Enterobacter",
|
||||
species = "asburiae/cloacae")
|
||||
)
|
||||
@ -52,7 +51,6 @@ Use \code{\link[=clear_custom_microorganisms]{clear_custom_microorganisms()}} to
|
||||
}
|
||||
\examples{
|
||||
\donttest{
|
||||
|
||||
# a combination of species is not formal taxonomy, so
|
||||
# this will result in only "Enterobacter asburiae":
|
||||
mo_name("Enterobacter asburiae/cloacae")
|
||||
@ -83,13 +81,15 @@ mo_info("Enterobacter asburiae/cloacae")
|
||||
|
||||
# the function tries to be forgiving:
|
||||
add_custom_microorganisms(
|
||||
data.frame(GENUS = "ESCHERICHIA / KLEBSIELLA SLASHLINE",
|
||||
data.frame(GENUS = "BACTEROIDES / PARABACTEROIDES SLASHLINE",
|
||||
SPECIES = "SPECIES")
|
||||
)
|
||||
mo_name("ESCHERICHIA / KLEBSIELLA")
|
||||
mo_rank("ESCHERICHIA / KLEBSIELLA")
|
||||
mo_name("BACTEROIDES / PARABACTEROIDES")
|
||||
mo_rank("BACTEROIDES / PARABACTEROIDES")
|
||||
|
||||
# taxonomy still works, although a slashline genus was given as input:
|
||||
mo_family("Escherichia/Klebsiella")
|
||||
mo_family("Bacteroides/Parabacteroides")
|
||||
|
||||
|
||||
# for groups and complexes, set them as species or subspecies:
|
||||
add_custom_microorganisms(
|
||||
|
0
man/age.Rd
Normal file → Executable file
0
man/age.Rd
Normal file → Executable file
0
man/age_groups.Rd
Normal file → Executable file
0
man/age_groups.Rd
Normal file → Executable file
0
man/antibiotic_class_selectors.Rd
Normal file → Executable file
0
man/antibiotic_class_selectors.Rd
Normal file → Executable file
0
man/antibiotics.Rd
Normal file → Executable file
0
man/antibiotics.Rd
Normal file → Executable file
0
man/as.ab.Rd
Normal file → Executable file
0
man/as.ab.Rd
Normal file → Executable file
0
man/as.av.Rd
Normal file → Executable file
0
man/as.av.Rd
Normal file → Executable file
0
man/as.disk.Rd
Normal file → Executable file
0
man/as.disk.Rd
Normal file → Executable file
0
man/as.mo.Rd
Normal file → Executable file
0
man/as.mo.Rd
Normal file → Executable file
0
man/atc_online.Rd
Normal file → Executable file
0
man/atc_online.Rd
Normal file → Executable file
0
man/av_from_text.Rd
Normal file → Executable file
0
man/av_from_text.Rd
Normal file → Executable file
0
man/av_property.Rd
Normal file → Executable file
0
man/av_property.Rd
Normal file → Executable file
0
man/availability.Rd
Normal file → Executable file
0
man/availability.Rd
Normal file → Executable file
0
man/bug_drug_combinations.Rd
Normal file → Executable file
0
man/bug_drug_combinations.Rd
Normal file → Executable file
0
man/count.Rd
Normal file → Executable file
0
man/count.Rd
Normal file → Executable file
0
man/custom_eucast_rules.Rd
Normal file → Executable file
0
man/custom_eucast_rules.Rd
Normal file → Executable file
0
man/dosage.Rd
Normal file → Executable file
0
man/dosage.Rd
Normal file → Executable file
0
man/eucast_rules.Rd
Normal file → Executable file
0
man/eucast_rules.Rd
Normal file → Executable file
0
man/example_isolates.Rd
Normal file → Executable file
0
man/example_isolates.Rd
Normal file → Executable file
0
man/example_isolates_unclean.Rd
Normal file → Executable file
0
man/example_isolates_unclean.Rd
Normal file → Executable file
0
man/g.test.Rd
Normal file → Executable file
0
man/g.test.Rd
Normal file → Executable file
0
man/get_episode.Rd
Normal file → Executable file
0
man/get_episode.Rd
Normal file → Executable file
0
man/ggplot_pca.Rd
Normal file → Executable file
0
man/ggplot_pca.Rd
Normal file → Executable file
0
man/ggplot_rsi.Rd
Normal file → Executable file
0
man/ggplot_rsi.Rd
Normal file → Executable file
0
man/guess_ab_col.Rd
Normal file → Executable file
0
man/guess_ab_col.Rd
Normal file → Executable file
0
man/intrinsic_resistant.Rd
Normal file → Executable file
0
man/intrinsic_resistant.Rd
Normal file → Executable file
0
man/italicise_taxonomy.Rd
Normal file → Executable file
0
man/italicise_taxonomy.Rd
Normal file → Executable file
0
man/key_antimicrobials.Rd
Normal file → Executable file
0
man/key_antimicrobials.Rd
Normal file → Executable file
0
man/kurtosis.Rd
Normal file → Executable file
0
man/kurtosis.Rd
Normal file → Executable file
0
man/mdro.Rd
Normal file → Executable file
0
man/mdro.Rd
Normal file → Executable file
0
man/mean_amr_distance.Rd
Normal file → Executable file
0
man/mean_amr_distance.Rd
Normal file → Executable file
0
man/microorganisms.codes.Rd
Normal file → Executable file
0
man/microorganisms.codes.Rd
Normal file → Executable file
0
man/mo_matching_score.Rd
Normal file → Executable file
0
man/mo_matching_score.Rd
Normal file → Executable file
0
man/mo_property.Rd
Normal file → Executable file
0
man/mo_property.Rd
Normal file → Executable file
0
man/mo_source.Rd
Normal file → Executable file
0
man/mo_source.Rd
Normal file → Executable file
0
man/pca.Rd
Normal file → Executable file
0
man/pca.Rd
Normal file → Executable file
0
man/plot.Rd
Normal file → Executable file
0
man/plot.Rd
Normal file → Executable file
0
man/proportion.Rd
Normal file → Executable file
0
man/proportion.Rd
Normal file → Executable file
0
man/random.Rd
Normal file → Executable file
0
man/random.Rd
Normal file → Executable file
0
man/resistance_predict.Rd
Normal file → Executable file
0
man/resistance_predict.Rd
Normal file → Executable file
0
man/rsi_translation.Rd
Normal file → Executable file
0
man/rsi_translation.Rd
Normal file → Executable file
0
man/skewness.Rd
Normal file → Executable file
0
man/skewness.Rd
Normal file → Executable file
0
man/translate.Rd
Normal file → Executable file
0
man/translate.Rd
Normal file → Executable file
Reference in New Issue
Block a user