Learn R Programming

datapackage (version 0.2.1)

new_datapackage: Create a new Data Package

Description

Create a new Data Package

Usage

new_datapackage(path, name = NULL, title = NULL, description = NULL, ...)

Value

The directory of path, or the directory containing path if path is a file name, is created and the file with the Data Package information is created. When path is a directory a file datapackage.json is created. The function returns an editable datapackage object.

Arguments

path

The directory which will contain the Data Package or the filename in which to write the Data Package.

name

The name of the Data Package.

title

The title of the Data Package.

description

The description of the Data Package.

...

Ignored for now.

Examples

Run this code
dir <- tempdir()
dp <- new_datapackage(dir, name = "test-package")

dp_title(dp) <- "A Test Data Package"
dp_add_contributor(dp) <- new_contributor(title = "John Doe")

# \dontshow{
file.remove(file.path(dir, "datapackage.json"))
file.remove(dir)
# }

Run the code above in your browser using DataLab