papaja (Preparing APA Journal Articles) is an R package that provides document formats to produce complete APA manuscripts from RMarkdown-files (PDF and Word documents) and helper functions that facilitate reporting statistics, tables, and plots.
Describe the bug
generate_author_yml on devel creates yaml for authors and affiliations. However, it sorts affiliations within each person. It should respect the listed order of affiliations by person.
To Reproduce
Note: "Person 2" = c("uni2", "uni1")
# remotes::install_github("crsh/papaja@devel")
library(papaja)
generate_author_yml (
researchers = list(
"Person 1" = c("uni1", "uni2"),
"Person 2" = c("uni2", "uni1")
),
affiliations = list(
"uni1" = "The First Uni",
"uni2" = "The Second Uni"
),
corres_name = "Person 1",
corres_address = "123 Example Street, Street, state 2121",
corres_email = "person1@example.com"
)
#> author:
#> - name : "Person 1"
#> affiliation : "1,2"
#> corresponding : yes
#> address : "123 Example Street, Street, state 2121"
#> email : "person1@example.com"
#> - name : "Person 2"
#> affiliation : "1,2"
#>
#>
#> affiliation:
#> - id : "1"
#> institution : "The First Uni"
#> - id : "2"
#> institution : "The Second Uni"
Expected behavior
Person 2's affiliation should be 2,1 not 1,2
Describe the bug generate_author_yml on devel creates yaml for authors and affiliations. However, it sorts affiliations within each person. It should respect the listed order of affiliations by person.
To Reproduce Note:
"Person 2" = c("uni2", "uni1")
Expected behavior Person 2's affiliation should be
2,1
not1,2