Objects of class "person"
can hold information about an
arbitrary positive number of persons. These can be obtained by one
call to person()
with list arguments, or by first creating
objects representing single persons and combining these via
c()
.
The format()
method collapses information about persons into
character vectors (one string for each person): the fields in
include
are selected, each collapsed to a string using the
respective element of collapse
and subsequently
“embraced” using the respective element of braces
, and
finally collapsed into one string separated by white space. If
braces
and/or collapse
do not specify characters for all
fields, the defaults shown in the usage are imputed.
If collapse
is FALSE
or NA
the corresponding
field is not collapsed but only the first element is used.
The print()
method calls the format()
method and prints
the result, the toBibtex()
method creates a suitable BibTeX
representation.
Person objects can be subscripted by fields (using $
) or by
position (using [
).
as.person()
is a generic function. Its default method tries to
reverse the default person formatting, and can also handle formatted
person entries collapsed by comma or "and"
(with appropriate
white space).
Personal names are rather tricky, e.g.,
https://en.wikipedia.org/wiki/Personal_name.
The current implementation (starting from R 2.12.0) of the
"person"
class uses the notions of given (including
middle names) and family names, as specified by given
and family
respectively. Earlier versions used a scheme based
on first, middle and last names, as appropriate for most of Western
culture where the given name precedes the family name, but not
universal, as some other cultures place it after the family name, or
use no family name. To smooth the transition to the new scheme,
arguments first
, middle
and last
are still
supported, but their use is deprecated and they must not be given in
combination with the corresponding new style arguments. For persons
which are not natural persons (e.g., institutions, companies, etc.) it
is appropriate to use given
(but not family
) for the
name, e.g., person("R Core Team", role = "aut")
.
The new scheme also adds the possibility of specifying roles
based on a subset of the MARC Code List for Relators
(https://www.loc.gov/marc/relators/relaterm.html).
When giving the roles of persons in the context of authoring R
packages, the following usage is suggested.
"aut"
(Author) Use for full authors who have made
substantial contributions to the package and should show up in the
package citation.
"com"
(Compiler) Use for persons who collected code
(potentially in other languages) but did not make further
substantial contributions to the package.
"cph"
(Copyright holder) Use for all copyright holders.
"cre"
(Creator) Use for the package maintainer.
"ctb"
(Contributor) Use for authors who have made
smaller contributions (such as code patches etc.) but should not
show up in the package citation.
"ctr"
(Contractor) Use for authors who have been
contracted to write (parts of) the package and hence do not own
intellectual property.
"dtc"
(Data contributor) Use for persons who
contributed data sets for the package.
"fnd"
(Funder) Use for persons or organizations that
furnished financial support for the development of the package.
"rev"
(Reviewer) Use for persons or organizations
responsible for reviewing (parts of) the package.
"ths"
(Thesis advisor) If the package is part of a
thesis, use for the thesis advisor.
"trl"
(Translator) If the R code is a translation from
another language (typically S), use for the translator to R.
In the old scheme, person objects were used for single persons, and a
separate "personList"
class with corresponding creator
personList()
for collections of these. The new scheme employs
a single class for information about an arbitrary positive number of
persons, eliminating the need for the personList
mechanism.
The comment
field can be used for “arbitrary” additional
information about persons. Elements named "ORCID"
will be
taken to give ORCID identifiers (see https://orcid.org/ for more
information), and be displayed as the corresponding URIs by the
print()
and format()
methods (see Examples
below).