1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 00:02:38 +02:00

support A. species for as.mo, cleanup

This commit is contained in:
2018-11-24 20:25:09 +01:00
parent 63ba4b2980
commit 9ddf6dc530
14 changed files with 126 additions and 93 deletions

View File

@ -58,7 +58,7 @@ This function uses Artificial Intelligence (AI) to help getting fast and logical
\itemize{
\item{Taxonomic kingdom: it first searches in bacteria, then fungi, then protozoa}
\item{Human pathogenic prevalence: it first searches in more prevalent microorganisms, then less prevalent ones}
\item{Valid MO codes and full names: it first searches in already valid MO code and genus/species combinations}
\item{Valid MO codes and full names: it first searches in already valid MO code and known genus/species combinations}
\item{Breakdown of input values: from here it starts to breakdown input values to find possible matches}
}
@ -132,16 +132,15 @@ df$mo <- as.mo(df$microorganism_name)
library(dplyr)
df$mo <- df \%>\%
select(microorganism_name) \%>\%
guess_mo()
as.mo()
# and can even contain 2 columns, which is convenient for genus/species combinations:
df$mo <- df \%>\%
select(genus, species) \%>\%
guess_mo()
# same result:
as.mo()
# although this works easier and does the same:
df <- df \%>\%
mutate(mo = guess_mo(paste(genus, species)))
mutate(mo = as.mo(paste(genus, species)))
}
}
\seealso{