View source: R/generate_author_yml.R
generate_author_yml | R Documentation |
This function helps organize YAML author and affiliation fields such that authorship order can be changed without having to also update the order of affiliations.
generate_author_yml(
researchers,
affiliations,
corres_name,
corres_address,
corres_email
)
researchers |
a list of named character vectors. Author information is stored in the name of the vector. Abbreviated affiliations are stored in the vector. |
affiliations |
a list of named character strings. Abbreviated affiliations are stored in the names, the full affiliation is stored in the string. |
corres_name |
A character string. The name of the corresponding author, must match the author details in the researcher argument identically. |
corres_address |
A character string. The address of the corresponding author |
corres_email |
A character string. The email of the corresponding author. |
library(papaja)
generate_author_yml (
researchers = list(
"Emma J. Citizen" = c("example_hospital", "example_college"),
"John H. Smith" = "example_college",
"Kate C. Jones" = "example_hospital"
),
affiliations = list(
"example_hospital" = "Southern Example Hospital, NSW, Australia",
"example_college" = "New Example College, VIC, Australia"
),
corres_name = "Emma J. Citizen",
corres_address = "123 Example Street, Epping, NSW 2121",
corres_email = "jane@example.com"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.