newdataresource: Create a new Data Resource

View source: R/newdataresource.R

newdataresourceR Documentation

Create a new Data Resource

Description

Create a new Data Resource

Usage

newdataresource(name, title = NULL, description = NULL, ...)

Arguments

name

The name of the Data Resource.

title

The title of the Data Resource.

description

The description of the Data Resource.

...

Ignored for now.

Value

Returns a dataresource object which is a list with the properties of the Data Resource.

Examples

dir <- tempdir()
dp <- newdatapackage(dir, name = "test-package")

res <- newdataresource(name = "iris")
dptitle(res) <- "The Iris Data Set"
dpencoding(res) <- "UTF-8"
dpmediatype(res) <- "text/csv"

# resource adds a resource if it doesn't yet exist or updates
# an existing resource
dpresource(dp, "iris") <- res





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