Skip to contents

Creates a RecipeUser object with a simple functional interface.

Usage

recipe_user(
  name,
  type = "individual",
  email = NULL,
  affiliation = NULL,
  institution = NULL,
  url = NULL,
  verified = FALSE
)

Arguments

name

Character. User or institution name.

type

Character. One of "individual" (default), "institutional_member", or "institution".

email

Character or NULL (default NULL). Email address.

affiliation

Character or NULL (default NULL). Organizational affiliation.

institution

RecipeUser object or character institution name. Required for "institutional_member" type. If a string is provided, it creates an institution user with that name automatically.

url

Character or NULL (default NULL). Institution URL.

verified

Logical (default FALSE). Whether the account is verified.

Value

A RecipeUser object.

Examples

# Individual user
user <- recipe_user("Juan Perez", email = "juan@example.com")

# Institution
inst <- recipe_user(
  "Instituto de Economia",
  type = "institution", verified = TRUE
)

# Member linked to institution
member <- recipe_user(
  "Maria",
  type = "institutional_member",
  institution = inst
)

# Member with institution name shortcut
member2 <- recipe_user(
  "Pedro",
  type = "institutional_member",
  institution = "IECON"
)