contributor: Creating and Adding Contributors to a Data Package

newcontributorR Documentation

Creating and Adding Contributors to a Data Package

Description

Creating and Adding Contributors to a Data Package

Usage

newcontributor(
  title,
  role = c("contributor", "author", "publisher", "maintainer", "wrangler"),
  path = NULL,
  email = NULL,
  organisation = NULL
)

dpaddcontributor(x, contributor)

dpaddcontributor(x) <- value

Arguments

title

A length 1 character vector with the full nam of the contributor.

role

The role of the contributor

path

A URL to e.g. a home page of the contributor

email

The email address of the contributor

organisation

The orgination the contributor belongs to.

x

The Data Package to which the contributor has to be added.

contributor

a contributor object

value

a contributor object

Value

newcontributor returns a list with the given properties. This function is meant to assist in creating valid contributors.

Examples

dp <- opendatapackage(system.file(package = "datapackage", "examples/iris")) 
dpcontributors(dp)
dpcontributors(dp) <- list(
  newcontributor("John Doe", email = "j.doe@somewhere.org"),
  list(title = "Jane Doe", role = "maintainer")
)
dpaddcontributor(dp) <- newcontributor("Janet Doe")


djvanderlaan/datapackage documentation built on March 18, 2024, 4:57 p.m.