Learn R Programming

schemate (version 0.1.0)

schema_group: Create a schema group fragment

Description

Create a schema group fragment

Usage

schema_group(names, value, description = NULL)

Value

A raw schema group fragment accepted in a schema document groups

list or by schema_add_group().

Arguments

names

Field names covered by the group.

value

Schema node fragment containing exactly one primary operator.

description

Optional group description.

Examples

Run this code
schema <- schema_doc(list(
    check = list(kind = "list"),
    groups = list(schema_group(c("x", "y"), schema_check("number")))
))
schema

schema_validate(schema, list(x = 1, y = 2), mode = "test")

Run the code above in your browser using DataLab