According to the binomial nomenclature, the lowest four taxonomic levels (family, genus, species, subspecies) should be printed in italic. This function finds taxonomic names within strings and makes them italic.

italicise_taxonomy(string, type = c("markdown", "ansi"))

italicize_taxonomy(string, type = c("markdown", "ansi"))



a character (vector)


type of conversion of the taxonomic names, either "markdown" or "ansi", see Details


This function finds the taxonomic names and makes them italic based on the microorganisms data set.

The taxonomic names can be italicised using markdown (the default) by adding * before and after the taxonomic names, or using ANSI colours by adding \033[3m before and \033[23m after the taxonomic names. If multiple ANSI colours are not available, no conversion will occur.

This function also supports abbreviation of the genus if it is followed by a species, such as "E. coli" and "K. pneumoniae ozaenae".

Maturing Lifecycle

The lifecycle of this function is maturing. The unlying code of a maturing function has been roughed out, but finer details might still change. Since this function needs wider usage and more extensive testing, you are very welcome to suggest changes at our repository or write us an email (see section 'Contact Us').

Read more on Our Website!

On our website you can find a comprehensive tutorial about how to conduct AMR data analysis, the complete documentation of all functions and an example analysis using WHONET data.


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"))

# since ggplot2 supports no markdown (yet), use
# italicise_taxonomy() and the `ggtext` package for titles:
# \donttest{
if (require("ggplot2") && require("ggtext")) {
           title = italicise_taxonomy("Amoxi/clav in E. coli")) +
    theme(plot.title = ggtext::element_markdown())
# }