Learn R Programming

taxotools (version 0.0.139)

taxo2doc: Taxolist to document

Description

Converts a taxolist to a formatted document in html, pdf or word document

Usage

taxo2doc(
  taxolist = NULL,
  genus = NA,
  family = NA,
  title = "",
  addsource = TRUE,
  mastersource = "",
  duplicatesyn = TRUE,
  sourcecol = c("black", "blue"),
  outformat = "html_document",
  outdir = tempdir(),
  outfile = "taxolist.html"
)

Value

NULL Saves a document file

Arguments

taxolist

taxolist

genus

only process for specific genus. Default("") implying process all

family

only process for specific family. Default("") implying process all

title

List title you want to print in output header

addsource

boolean If the source tag should be displayed. Default TRUE

mastersource

source string for the master list

duplicatesyn

boolean if synonyms should to displayed in their alphabetical sorted position too. Default TRUE

sourcecol

vector of text color values for each source value

outformat

output format one of "html_document", "word_document", "odt_document", "rtf_document", "pdf_document". Default ("html_document")

outdir

output directory for the document. Default temporary directory.

outfile

output file name. Default ("taxolist.html")

Details

Converts a taxolist to a formatted document in html, pdf or word document making it easy for taxonomist to read through the data

See Also

Other List functions: DwC2taxo(), cast_cs_field(), compact_ids(), get_synonyms(), match_lists(), melt_cs_field(), merge_lists(), syn2taxo(), synonymize_subspecies(), taxo2DwC(), taxo2syn(), wiki2taxo()

Examples

Run this code
# \donttest{
mytaxo <- data.frame("id" = c(1,2,3,4,5,6,7),
                    "canonical" = c("Hypochlorosis ancharia",
                                    "Hypochlorosis tenebrosa",
                                    "Pseudonotis humboldti",
                                    "Myrina ancharia",
                                    "Hypochlorosis ancharia tenebrosa",
                                    "Hypochlorosis ancharia obiana",
                                    "Hypochlorosis lorquinii"),
                     "family" = c("Lycaenidae", "Lycaenidae", "Lycaenidae",
                                  "Lycaenidae", "Lycaenidae", "Lycaenidae",
                                  "Lycaenidae"),
                    "accid" = c(0,1,1,1,0,0,0),
                    "source" = c("itis","itis","wiki","wiki","itis",
                                 "itis","itis"),
                    stringsAsFactors = FALSE)
taxo2doc(mytaxo)
taxo2doc(mytaxo,source="My list")
# }

Run the code above in your browser using DataLab