schema: Create table schema

Description Usage Arguments Details References See Also Examples

Description

A schema declaration for a tabular data resource.

Usage

1
2
schema(fields = list(), missingValues = NULL, primaryKey = NULL,
  foreignKeys = list(), ...)

Arguments

fields

(list of named lists) See field. An empty fields is permitted to allow use with a resource data object.

missingValues

(character) Strings treated as NA (see table-schema/missing-values).

primaryKey

(character) Name of primary key field(s) (see table-schema/primary-key).

foreignKeys

(list of named lists) See foreignKey.

...

(name = value) Additional properties.

Details

TODO: Support writing schemas to file with a path argument.

References

https://specs.frictionlessdata.io/table-schema/

See Also

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

Examples

1
2
3
4
5
6
7
8
9
schema(
  fields = list(
    field(name = "id", type = "integer"),
    field(name = "value", type = "number")
  ),
  missingValues = c("", "NA"),
  primaryKey = "id",
  tableSchema = TRUE
)

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