4.9 Multiple authors in a document

We can add multiple authors to an R Markdown document within the YAML frontmatter in a number of ways. If we simply want to list them on the same line, we can provide a single string to the document, e.g.,

---
title: "Untitled"
author: "John Doe, Jane Doe"
---

Alternatively, if we wish for each entry to be on its own line, we can provide a list of entries to the YAML field. This can be useful if you wish to include further information about each author such as an Email address or institution, e.g.,

---
author:
  - John Doe, Institution One
  - Jane Doe, Institution Two
---

We can make use of the Markdown syntax ^[] to add additional information as a footnote to the document. This may be more useful if you have extended information that you wish to include for each author, such as providing a contact Email and address. The exact behavior will depend on the output format:

---
author:
  - John Doe^[Institution One, john@example.org]
  - Jane Doe^[Institution Two, jane@example.org]
---

Certain R Markdown templates will allow you to specify additional parameters directly within the YAML. For example, the Distill output format allows url, affiliation, and affiliation_url to be specified. After you install the distill package (J. Allaire, Iannone, and Xie 2020):

install.packages("distill")

You can use the Distill format with detailed author information, e.g.,

---
title: "Distill for R Markdown"
author:
  - name: "JJ Allaire"
    url: https://github.com/jjallaire
    affiliation: RStudio
    affiliation_url: https://www.rstudio.com
output: distill::distill_article
---

References

Allaire, JJ, Rich Iannone, and Yihui Xie. 2020. Distill: R Markdown Format for Scientific and Technical Writing. https://github.com/rstudio/distill.