Learn R Programming

datapackage (version 0.2.1)

new_contributor: Creating and Adding Contributors to a Data Package

Description

Creating and Adding Contributors to a Data Package

Usage

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

dp_add_contributor(x, contributor)

dp_add_contributor(x) <- value

Value

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

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

Examples

Run this code
dp <- open_datapackage(system.file(package = "datapackage", "examples/iris")) 
dp_contributors(dp)
dp_contributors(dp) <- list(
  new_contributor("John Doe", email = "j.doe@somewhere.org"),
  list(title = "Jane Doe", role = "maintainer")
)
dp_add_contributor(dp) <- new_contributor("Janet Doe")

Run the code above in your browser using DataLab