resource: Create resource metadata

Description Usage Arguments References See Also Examples

Description

The metadata for a data resource. See set_resource and get_resource to set and get resource metadata to and from an object.

Usage

1
2
3
4
resource(name = NULL, path = NULL, profile = NULL, title = NULL,
  description = NULL, format = NULL, mediatype = NULL,
  encoding = "UTF-8", schema = list(), bytes = NULL, hash = NULL,
  sources = list(), licenses = list(), ...)

Arguments

name

(character) Resource name.

path

(character) URLs or paths relative to the data package directory (see data-resource/path-data-in-files).

profile

(character) Custom resource profile (see https://specs.frictionlessdata.io/profiles/).

title

(character) Human-readable title.

description

(character) Human-readable description.

format

(character) Output format (e.g. "csv", "json").

mediatype

(character) Mediatype/mimetype of the output (e.g. "text/csv", "application/json").

encoding

(character) Character encoding of the output (see http://www.iana.org/assignments/character-sets/character-sets.xhtml).

schema

(named list) See schema.

bytes

(integer) Size of the output file in bytes.

hash

(character) MD5 hash of the output file.

sources

(list) See source.

licenses

(list) See license.

...

(name = value) Additional properties.

References

https://specs.frictionlessdata.io/data-resource/

See Also

Other meta objects: constraints, contributor, field, foreignKey, package, schema, source

Other resource functions: get_package, get_resource, set_resources, set_resource

Examples

1
2
3
4
5
6
resource(
 name = "data",
 path = "data/data.csv",
 format = "csv",
 schema = schema(missingValues = "")
)

ezwelty/dpkg documentation built on May 30, 2019, 7:19 a.m.