AutoAff: Automatic generation of affiliation lists.

Description Usage Arguments Details Value Examples

View source: R/AutoAff.R

Description

AutoAff facilitates the management for long author lists and their affiliations. The outputs include a text string of R Markdown syntax that can be knitted to create superscripted indices.

Usage

1
AutoAff(X, affiliation)

Arguments

X

A user-supplied data frame with columns containing the authors' affiliations.

affiliation

Names of the variables containing affiliations. A character vector, see 'Examples'.

Details

Empty cells (for those authors with fewer affiliations) in X have to be either NA or "".

Copy and paste rmd in result into R Markdown and knit to Microsoft Word to get affiliation lists with superscripted indices. See 'Examples'.

Value

This function returns a list with six elements:

rmd

Indexed affiliations in R Markdown syntax, see 'Details'.

affiliations

Affiliations by order of appearance

aff.count

Number of different affiliations

aut.count

Number of authors

index

Indices of each author's affililation(s)

missing

Number of authors with no affiliations

Examples

1
2
3
4
5
6
result <- AutoAff(X = authors,
                  affiliation = c("aff1", "aff2", "aff3", "aff4", "aff5", "aff6"))
result

# R Markdown syntax
result$rmd

ly129/AutoAff documentation built on Nov. 4, 2019, 5:16 p.m.