Skip to content

Uses the Authors@R field.

Usage

desc_add_me(
  role = "ctb",
  comment = NULL,
  orcid = NULL,
  file = ".",
  normalize = FALSE
)

Arguments

role

Role to set for the user, defaults to contributor.

comment

Comment, empty by default.

orcid

ORCID, empty by default.

file

DESCRIPTION file to use. By default the DESCRIPTION file of the current package (i.e. the package the working directory is part of) is used.

normalize

Whether to "normalize" (reorder and reformat) the fields when writing back the result. See desc_normalize().

Details

desc_add_me is a convenience function, it adds the current user as an author, and it needs the whoami package to be installed. It'll add your ORCID ID if you provide it as argument or save it as ORCID_ID environment variable in .Renviron. The full name is parsed using as.person and collapsing the given name and the family name in order to e.g. have the first and middle names together as given name. This approach might be limited to some full name structures.