| Plume | R Documentation |
Class that generates author lists and other author-related information as character strings.
plume::NameHandler -> plume::PlumeHandler -> plume::StatusSetter -> plume::StatusSetterPlume -> Plume
new()Create a Plume object.
Plume$new( data, names = NULL, symbols = NULL, roles = credit_roles(), credit_roles = FALSE, initials_given_name = FALSE, family_name_first = FALSE, interword_spacing = TRUE, orcid_icon = orcid(), by = NULL )
dataA data frame containing author-related data.
namesA vector of key-value pairs specifying custom names to use, where keys are default names and values their respective replacements.
symbolsA list of key-value pairs defining the symbols to use to
link authors and their metadata. Valid keys are "affiliation",
"corresponding" and "note". By default, uses digits for
affiliations, "*" for corresponding authors and "†", "‡", "§",
"¶", "#", "**" for notes. Set a key to NULL to use numerals.
rolesA vector of key-value pairs defining roles where keys identify role columns and values describe the actual roles to use.
credit_rolesIt is now recommended to use roles = credit_roles() to use the
Contributor Roles Taxonomy.
initials_given_nameShould the initials of given names be used?
family_name_firstShould literal names show family names first?
interword_spacingShould literal names use spacing? This parameter is only useful for people writing in languages that don't separate words with a space such as Chinese or Japanese.
orcid_iconThe ORCID icon, as defined by orcid(), to be used.
byA character string defining the default variable used to assign
specific metadata to authors in all set_*() methods. By default, uses
authors' id.
A Plume object.
get_author_list()Get author list.
Plume$get_author_list(suffix = NULL, format = deprecated())
suffix lets you choose which symbol categories to suffix authors with,
using the following keys:
a for affiliations
c for corresponding authors
n for notes
o for ORCIDs
The order of the keys determines the order of symbol types. E.g. "ac"
shows affiliation ids first and corresponding author mark second, when
"ca" shows corresponding author mark first and affiliation ids second.
Use "," to separate and "^" to superscript symbols.
Use NULL or an empty string to list author names without suffixes.
A character vector.
get_affiliations()Get authors' affiliations.
Plume$get_affiliations(superscript = TRUE, sep = "")
superscriptShould affiliation ids be superscripted?
sepSeparator used to separate affiliation ids and affiliations.
A character vector.
get_notes()Get authors' notes.
Plume$get_notes(superscript = TRUE, sep = "")
superscriptShould note ids be superscripted?
sepSeparator used to separate note ids and notes.
A character vector.
get_orcids()Get authors' ORCID.
Plume$get_orcids(compact = FALSE, icon = TRUE, sep = "")
compactShould links only display the 16-digit identifier?
iconShould the ORCID icon be shown?
sepSeparator used to separate authors and their respective ORCID.
A character vector.
get_contact_details()Get the contact details of corresponding authors.
Plume$get_contact_details(
format = "{details} ({name})",
email = TRUE,
phone = FALSE,
fax = FALSE,
url = FALSE,
sep = ", "
)formatA glue specification that uses the
variables name and/or details.
email, phone, fax, urlArguments equal to TRUE are evaluated and
passed to the variable details. By default, only email is set to
TRUE.
sepSeparator used to separate details items.
A character vector.
get_contributions()Get authors' contributions.
Plume$get_contributions( roles_first = TRUE, by_author = FALSE, alphabetical_order = FALSE, dotted_initials = TRUE, literal_names = FALSE, divider = ": ", sep = ", ", sep_last = " and " )
roles_firstIf TRUE, displays roles first and authors second. If
FALSE, roles follow authors.
by_authorShould roles be grouped by author?
alphabetical_orderShould authors be listed in alphabetical order? By default, lists authors in the order they are defined in the data.
dotted_initialsShould initials be dot-separated?
literal_namesShould literal names be used?
dividerSeparator used to separate roles from authors.
sepSeparator used to separate roles or authors.
sep_lastSeparator used to separate the last two roles or authors if more than one item is associated to a role or author.
A character vector.
clone()The objects of this class are cloneable with this method.
Plume$clone(deep = FALSE)
deepWhether to make a deep clone.
# Create a Plume instance
aut <- Plume$new(encyclopedists)
# Set the desired corresponding authors, using
# authors' id by default
aut$set_corresponding_authors(1, 4)
# Getting authors suffixed by affiliation ids
# and the corresponding author mark:
aut$get_author_list("^a,c^")
# Or maybe with the corresponding author mark
# coming before affiliation ids:
aut$get_author_list("^c,a^")
# Getting more author metadata
aut$get_affiliations()
aut$get_contributions()
# Use `symbols` to change the default symbols.
# E.g. to use letters as affiliation ids:
aut <- Plume$new(
encyclopedists,
symbols = list(affiliation = letters)
)
aut$get_author_list("^a^")
aut$get_affiliations()
# It is also possible to output contributions in the
# active voice
aut <- Plume$new(encyclopedists, roles = c(
supervision = "supervised the project",
writing = "contributed to the Encyclopédie"
))
aut$get_contributions(roles_first = FALSE, divider = " ")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.