Skip to contents

This helper function allows you to set new default names to a plume subclass, e.g. to set default names to a language other than English.

Usage

set_default_names(..., .plume_quarto = FALSE)

Arguments

...

Key-value pairs where keys are default names and values their respective replacements.

.plume_quarto

Are you setting new names for PlumeQuarto?

Value

A named list.

Details

Available names are:

id, initials, literal_name, corresponding, contributor_rank, given_name, family_name, email, phone, fax, url, affiliation, role, note, orcid.

Using .plume_quarto = TRUE adds deceased, equal_contributor, number, dropping_particle and acknowledgements.

Examples

# Extending `Plume` with default names in French
PlumeFr <- R6::R6Class(
  classname = "PlumeFr",
  inherit = Plume,
  private = list(
    plume_names = set_default_names(
      initials = "initiales",
      literal_name = "nom_complet",
      corresponding = "correspondant",
      given_name = "prénom",
      family_name = "nom",
      email = "courriel",
      phone = "téléphone"
    )
  )
)

PlumeFr$new(encyclopedists_fr)
#> # A tibble: 4 × 11
#>      id prénom  nom   nom_complet initiales courriel téléphone orcid role  note 
#>   <int> <chr>   <chr> <chr>       <chr>     <chr>    <chr>     <chr> <chr> <chr>
#> 1     1 Denis   Dide… Denis Dide… DD        diderot… +1234     0000… Supe… né e…
#> 2     2 Jean-J… Rous… Jean-Jacqu… J-JR      roussea… NA        0000… NA    NA   
#> 3     3 Franço… Arou… François-M… F-MA      arouet@… NA        NA    NA    dit …
#> 4     4 Jean    Le R… Jean Le Ro… JLRd'A    alember… NA        0000… Supe… né e…
#> # ℹ 1 more variable: affiliation <list>