Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate_author_yml does not retain affiliation order for each person #569

Closed
conig opened this issue Oct 3, 2023 · 1 comment
Closed
Assignees

Comments

@conig
Copy link
Contributor

conig commented Oct 3, 2023

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

@crsh
Copy link
Owner

crsh commented Oct 6, 2023

Fixed in #570

@crsh crsh closed this as completed Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants