plume
plume copied to clipboard
Roles propagate to authors with no roles
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
#> ---