use_author {usethis}R Documentation

Add an author to the Authors@R field in DESCRIPTION

Description

use_author() adds a person to the Authors@R field of the DESCRIPTION file, creating that field if necessary. It will not modify, e.g., the role(s) or email of an existing author (judged using their "Given Family" name). For that we recommend editing DESCRIPTION directly. Or, for programmatic use, consider calling the more specialized functions available in the desc package directly.

use_author() also surfaces two other situations you might want to address:

Usage

use_author(given = NULL, family = NULL, ..., role = "ctb")

Arguments

given

a character vector with the given names, or a list thereof.

family

a character string with the family name, or a list thereof.

...

Arguments passed on to utils::person

middle

a character string with the collapsed middle name(s). Deprecated, see Details.

email

a character string (or vector) giving an e-mail address (each), or a list thereof.

comment

a character string (or vector) providing comments, or a list thereof.

first

a character string giving the first name. Deprecated, see Details.

last

a character string giving the last name. Deprecated, see Details.

role

a character vector specifying the role(s) of the person (see Details), or a list thereof.

Examples

## Not run: 
use_author(
  given = "Lucy",
  family = "van Pelt",
  role = c("aut", "cre"),
  email = "lucy@example.com",
  comment = c(ORCID = "LUCY-ORCID-ID")
)

use_author("Charlie", "Brown")

## End(Not run)


[Package usethis version 3.0.0 Index]