The function generates an XML nodeset that contains the contributors' name,
affiliation, and their CRediT roles with a structure outlined in the
JATS 1.2 DTD specifications (eLife). The output is generated from an
contributors_table
based on the contributors_table_template()
.
Value
The function returns an xml nodeset containing the contributors listed for each CRediT role they partake in.
Warning
The function is primarily developed to be the part of a shiny app. As the validation is handled inside of the app separately, the function can break with non-informative errors if running locally without first validating it.
See also
Other output functions:
print_conflict_statement()
,
print_credit_roles()
,
print_funding()
,
print_title_page()
,
print_yaml()
Examples
example_contributors_table <- read_contributors_table(
contributors_table = system.file("extdata",
"contributors_table_example.csv", package = "tenzing", mustWork = TRUE))
#> Rows: 3 Columns: 26
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (9): Firstname, Middle name, Surname, Affiliation 1, Affiliation 2, Aff...
#> dbl (1): Order in publication
#> lgl (16): Conceptualization, Data curation, Formal analysis, Funding acquisi...
#>
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
print_xml(contributors_table = example_contributors_table)
#> {xml_document}
#> <contrib-group>
#> [1] <contrib>\n <name surname="Kovacs" given-names="Marton"/>\n <role vocab ...
#> [2] <contrib>\n <name surname="Luthor" given-names="Lex W."/>\n <role vocab ...
#> [3] <contrib>\n <name surname="Smith" given-names="John M."/>\n <role vocab ...