formatAuthors: format authors

Description Usage Arguments Value Examples

View source: R/formatAuthors.R

Description

format authors

Usage

1
2
3
4
5
6
formatAuthors(authorTable, infoSymbol1 = "\\*", infoSymbol2 = "<e2><80><a0>",
  infoSymbol3 = "<c2><a7>", infoSymbol4 = "<e2><80><a1>", infoSymbol5 = "#",
  infoText1 = "These authors contributed equally to this work",
  infoText2 = "These authors contributed equally to this work",
  infoText3 = "Corresponding author", infoText4 = "Did not contribute much",
  infoText5 = "Can't read or write")

Arguments

authorTable

Input data. A data.frame with columns entitled "Name" and "Affiliation", and upto 5 optional columns labelled "info1" .. "info5". An example is included in the package (exampleInput). Expects 1 row for each unique author / affiliation pair (i.e. 2 rows for an author with 2 affiliations). Rows should be ordered to reflect intended authorship order.

infoSymbol[n]

the superscript symbol chosen to represent each supplementary designation. Note that some symbols may require additional escape characters for correct interpretation by markdown.

infoText[n]

description of supplementary designation (e.g. Corresponding author)

Value

Returns markdown-formatted text

Examples

1
2
3
4
5
# display internal example input format
exampleInput

# number author affiliations
formatAuthors(exampleInput)

jamesware/knitauthors documentation built on May 17, 2017, 9:44 a.m.