AMR/man/italicise_taxonomy.Rd

33 lines
1.6 KiB
Plaintext
Raw Normal View History

2021-05-03 10:47:32 +02:00
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/italicise_taxonomy.R
\name{italicise_taxonomy}
\alias{italicise_taxonomy}
\alias{italicize_taxonomy}
\title{Italicise Taxonomic Families, Genera, Species, Subspecies}
\usage{
italicise_taxonomy(string, type = c("markdown", "ansi", "html"))
2021-05-03 10:47:32 +02:00
italicize_taxonomy(string, type = c("markdown", "ansi", "html"))
2021-05-03 10:47:32 +02:00
}
\arguments{
2021-05-12 18:15:03 +02:00
\item{string}{a \link{character} (vector)}
2021-05-03 10:47:32 +02:00
\item{type}{type of conversion of the taxonomic names, either "markdown", "html" or "ansi", see \emph{Details}}
2021-05-03 10:47:32 +02:00
}
\description{
2022-08-21 16:37:20 +02:00
According to the binomial nomenclature, the lowest four taxonomic levels (family, genus, species, subspecies) should be printed in italics. This function finds taxonomic names within strings and makes them italic.
2021-05-03 10:47:32 +02:00
}
\details{
This function finds the taxonomic names and makes them italic based on the \link{microorganisms} data set.
The taxonomic names can be italicised using markdown (the default) by adding \code{*} before and after the taxonomic names, or \verb{<i>} and \verb{</i>} when using html. When using 'ansi', ANSI colours will be added using \verb{\\033[3m} before and \verb{\\033[23m} after the taxonomic names. If multiple ANSI colours are not available, no conversion will occur.
2021-05-03 10:47:32 +02:00
This function also supports abbreviation of the genus if it is followed by a species, such as "E. coli" and "K. pneumoniae ozaenae".
}
\examples{
italicise_taxonomy("An overview of Staphylococcus aureus isolates")
italicise_taxonomy("An overview of S. aureus isolates")
cat(italicise_taxonomy("An overview of S. aureus isolates", type = "ansi"))
2021-05-24 09:00:11 +02:00
}