schema: Get the Table Schema of a Data Resource

View source: R/schema.R

schemaR Documentation

Get the Table Schema of a Data Resource

Description

Gets the Table Schema of a Data Resource (in a Data Package), i.e. the content of its schema property, describing the resource's fields, data types, relationships, and missing values. The resource must be a Tabular Data Resource.

Usage

schema(package, resource_name)

Arguments

package

Data Package object, as returned by read_package() or create_package().

resource_name

Name of the Data Resource.

Details

See vignette("table-schema") to learn more about Table Schema.

Value

List describing a Table Schema.

See Also

Other accessor functions: resource(), resource_names()

Examples

# Load the example Data Package
package <- example_package()

# Get the Table Schema for the resource "observations"
schema <- schema(package, "observations")
str(schema)

frictionless documentation built on July 31, 2026, 9:06 a.m.