The function generates a YAML document containing the contributors information and contributions according to the CRediT taxonomy. The output is generated from an contributors_table validated with the validate_contributors_table() function. The contributors_table must be based on the contributors_table_template().

print_yaml(contributors_table)

Arguments

contributors_table

validated contributors_table

Value

The function returns a YAML document

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_credit_roles(), print_funding(), print_title_page(), print_xml()

Examples

example_contributors_table <- read_contributors_table( contributors_table = system.file("extdata", "contributors_table_example.csv", package = "tenzing", mustWork = TRUE))
#> Rows: 5 Columns: 24
#> ── Column specification ──────────────────────────────────────────────────────── #> Delimiter: "," #> chr (7): Firstname, Middle name, Surname, Email address, Primary affiliatio... #> 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.
validate_contributors_table(contributors_table = example_contributors_table)
#> $missing_surname #> $missing_surname$type #> [1] "success" #> #> $missing_surname$message #> [1] "There are no missing surnames." #> #> #> $missing_firstname #> $missing_firstname$type #> [1] "success" #> #> $missing_firstname$message #> [1] "There are no missing firstnames." #> #> #> $duplicate_names #> $duplicate_names$type #> [1] "success" #> #> $duplicate_names$message #> [1] "There are no duplicate names in the contributors_table." #> #> #> $duplicate_initials #> $duplicate_initials$type #> [1] "success" #> #> $duplicate_initials$message #> [1] "There are no duplicate initials in the contributors_table." #> #> #> $missing_order #> $missing_order$type #> [1] "success" #> #> $missing_order$message #> [1] "There are no missing values in the order of publication." #> #> #> $duplicate_order #> $duplicate_order$type #> [1] "success" #> #> $duplicate_order$message #> [1] "There are no duplicated order numbers in the contributors_table." #> #> #> $missing_affiliation #> $missing_affiliation$type #> [1] "success" #> #> $missing_affiliation$message #> [1] "There are no missing affiliations in the contributors_table." #> #> #> $missing_corresponding #> $missing_corresponding$type #> [1] "success" #> #> $missing_corresponding$message #> [1] "There is at least one author indicated as corresponding author." #> #> #> $missing_credit #> $missing_credit$type #> [1] "success" #> #> $missing_credit$message #> [1] "All authors have at least one CRediT statement checked." #> #> #> $missing_email #> $missing_email$type #> [1] "success" #> #> $missing_email$message #> [1] "There are email addresses provided for all corresponding authors." #> #>
print_yaml(contributors_table = example_contributors_table)
#> [1] "author:\n - name: Alex O. Holcombe\n affiliation: '1'\n role:\n - Conceptualization\n - Project administration\n - Validation\n - Writing - original draft\n - Writing - review & editing\n - name: Marton Kovacs\n affiliation: '2,5'\n role:\n - Conceptualization\n - Data curation\n - Project administration\n - Software\n - Validation\n - Visualization\n - Writing - original draft\n - Writing - review & editing\n corresponding: yes\n email: marton.balazs.kovacs@gmail.com\n address: Enter postal address here\n - name: Balazs Aczel\n affiliation: '2'\n role:\n - Conceptualization\n - Supervision\n - Validation\n - Writing - review & editing\n - name: Frederik Aust\n affiliation: '3,6'\n role:\n - Conceptualization\n - Project administration\n - Software\n - Validation\n - Writing - review & editing\n - name: Julien Colomb\n affiliation: '4'\n role:\n - Conceptualization\n - Project administration\n - Validation\n\naffiliation:\n - id: '1'\n institution: University of Sydney\n - id: '2'\n institution: Institute of Psychology, ELTE Eotvos Lorand University, Budapest,\n Hungary\n - id: '3'\n institution: University of Cologne, Cologne, Germany\n - id: '4'\n institution: Humboldt University of Berlin\n - id: '5'\n institution: Doctoral School of Psychology, ELTE Eotvos Lorand University, Budapest,\n Hungary\n - id: '6'\n institution: University of Amsterdam, Amsterdam, Netherlands\n"