print_name: Format Usage Names for Publications

Description Usage Arguments Details Value Author(s) See Also Examples

Description

When writing on bio-diversity, usage names could be automatically inserted in documents including the typical italic format for different elements of a scientific name. The function 'print_name' can be applied either in markdown documents or for graphics.

Usage

1
2
3
## S4 method for signature 'taxlist,numeric'
print_name(object, id, concept=TRUE, second_mention=FALSE,
	include_author=TRUE, secundum, style="markdown", ...)

Arguments

object

An object of class taxlist.

id

Integer containing either a concept or a name ID.

concept

Logical value, whether 'id' corresponds to a concept ID or a taxon usage name ID.

second_mention

Logical value, whether the genus name should be abbreviated or not.

include_author

Logical value, whether authors of the name should be mentioned or not.

secundum

Character value indicating the column in slot 'taxonViews' that will be mentioned as secundum (according to).

style

Character value indicating the alternative format for italics (at the moment only markdown and html implemented).

...

Further arguments passed among methods.

Details

In Rmarkdown documents use `r I(print_name(Easplist, 206))` for inserting a formatted a species name.

Value

A character value including format to italic font.

Author(s)

Miguel Alvarez ([email protected]).

See Also

mixedFontLabel.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
## Example using Rmarkdown
library(taxlist)
data(Easplist)
summary(Easplist, 363, secundum="secundum")

## Empty plot
plot(NA, xlim=c(0,5), ylim=c(6,1), bty="n", xaxt="n", xlab="", ylab="options")

## Accepted name with author
text(0, 1, labels=print_name(Easplist, 363, style="expression"), pos=4)

## Including taxon view
text(0, 2, labels=print_name(Easplist, 363, style="expression",
	secundum="secundum"), pos=4)

## Second mention in text
text(0, 3, labels=print_name(Easplist, 363, style="expression",
	second_mention=TRUE), pos=4)

## Using synonym
text(0, 4, labels=print_name(Easplist, 50037, style="expression",
	concept=FALSE), pos=4)

## Markdown style
text(0, 5, labels=print_name(Easplist, 363, style="markdown"), pos=4)

## HTML style
text(0, 6, labels=print_name(Easplist, 363, style="html"), pos=4)

taxlist documentation built on July 2, 2018, 1:03 a.m.