plume icon indicating copy to clipboard operation
plume copied to clipboard

Roles propagate to authors with no roles

Open arnaudgallou opened this issue 1 year ago • 0 comments

tmp <- withr::local_tempfile(
  lines = "---\n---\n",
  fileext = ".qmd"
)

aut <- plume::PlumeQuarto$new(
  tibble::tibble(
    given_name = c("A", "B"),
    family_name = c("A", "B"),
    writing = c(1, NA),
    analysis= c(1, NA)
  ),
  file = tmp
)
aut$to_yaml()

cat(readr::read_file(tmp))
#> ---
#> author:
#>   - id: aut1
#>     name:
#>       given: A
#>       family: A
#>     roles:
#>       - formal analysis
#>       - writing - original draft
#>   - id: aut2
#>     name:
#>       given: B
#>       family: B
#>     roles:
#>       - formal analysis
#>       - writing - original draft
#> ---

arnaudgallou avatar Aug 16 '24 06:08 arnaudgallou