Learn R Programming

schemate (version 0.1.0)

schema_del_position: Delete a position schema from an unnamed container node

Description

Delete a position schema from an unnamed container node

Usage

schema_del_position(x, index, path = "$", missing = "error")

Value

A modified SchemaDoc.

Arguments

x

A SchemaDoc.

index

1-based position index to remove.

path

Path to the target unnamed container node. Use $ for the root node.

missing

Missing-target behavior. Use "error" to raise an error or "ignore" to leave the schema unchanged.

Examples

Run this code
schema <- schema_doc(list(check = list(kind = "list"), keys = list(type = "unnamed")))
schema <- schema_add_position(schema, 1, schema_check("string"))
schema <- schema_del_position(schema, 1)
schema

as.list(schema)$positions

Run the code above in your browser using DataLab